How to defer offscreen images in Shopify? - optimization

According to Google PageSpeed Insights, defer offscreen image is taking >10sec to load a page. I want to know how to handle/fix this issue in the coding section. I think it it can be done by using media queries but HOW?
I have already compressed images and adjust images dimensions.
My page speed is 10/100 for mobile and 65/100 for desktop.
"https://withambience.com/collections/all-time-favorites/products/royalwinterleggings"
Thanks

I recommend lazy loading your images. Here's a quick tutorial that uses the lazysizes library. And here's a more general optimization article from the shopify team. Best of luck.

Related

Wagtail ImageChooserPanel: upload only, do not show other images in collections

I'm building a site with different users who should not see each others' uploaded images. The wagtailimages.Image model and ImageChooserPanel always show all the images in the various "collections".
How can I customize ImageChooserPanel so that it only offers image upload?
I can use a Django models.ImageField and its simple upload widget but then do not get the nice preview in an Orderable list, nor the different rendition sizes. A previous query on this goal was ill-informed: Limit ImageChooserPanel to children of current Page? and now I realize it's basically a widget UX change I want.
Thanks.
Perhaps this https://github.com/spapas/wagtail-faq/blob/master/README.md#ok-fine-but-i-dont-want-my-editors-to-be-able-to-select-small-images and this could help https://github.com/neon-jungle/wagtailmodelchooser

Banner image doesn't load with Hippo CMS

I have been applying custom html/css layout to hippo. in homepage-main.ftl I have an image which is 1366x518 and ~400KB in size. Here's how it's implemented.
<img src="<#hst.webfile path="/images/homebanner.jpg"/>"/> However, when I run Hippo CMS it doesn't load (404 error in Chrome dev tool console) the banner image but it shows all the other images. I checked cms.war and i found this image inside cms->WEB-INF->lib->[projectname]-bootstrap-content-[snapshot version].jar. I put a small size image instead of homebanner.jpg and it worked. I am not sure whether this is an issue on Hippo CMS or Tomcat 8 configuration. any answer would be really appreciated.
Simple answer:
Webfiles are limited to 256kb by default, it won't pick up anything bigger.
See also: http://www.onehippo.org/library/concepts/web-files/web-files-configuration.html if you want to change the max file size.
I would reccomend looking at making your banner configurable from within the CMS and using Imagesets for larger sizes.

How to combine imageresizer responsive images with lazy load

I have implemented a lazy-load solution for images using http://www.appelsiini.net/projects/lazyload, and it works as expected.
Now that the DNN skin I'm working on is responsive, I want to make use of ImageResizer's responsive solution: http://imageresizing.net/blog/2013/effortless-responsive-images -- the setup is working right now, but when combined with lazy-load, the images that are served are no longer responsive.
Is there a way to combine these two technologies?
We run the latest .NET and IIS 7+. Thanks in advance!
Images added to the page after DOMLoaded will not be detected by Slimmage.js unless you call window.slimmage.checkResponsiveImages() . If you use a separate lazy-load or jQuery plugin that modifies images, call checkResponsiveImages() after it completes its work.
Browser vendors advise against lazy image loading, as it drains mobile device power. Turning on the wifi or LTE radio is the most expensive operation for a device, and lazy loading can make it 3-10x more chatty.

How to integrate jQuery Lazy Load into Meta Slider WordPress plugin?

Unfortunately for me, Meta Slider WP plugin does not support lazy load, but it's perfect for what I need -- well almost. Here's why:
I have a ton of images (per slider) that will be displayed in multiple sliders using this WP Meta Slider plugin. All sliders will use the Flex Slider option, not the other options they have available. And, as you can imagine, the page load time is awful.
I looked up lazy load and came across this site:
http://www.appelsiini.net/projects/lazyload
It seems to be the perfect solution for what I need, but where do I need to input the snippet of coding in Meta Slider files to get this plugin to stop loading all the images at one time? What's happening is when a visitor comes to the site, this plugin loads every single image you have uploaded to it at that first-time page load which is causing the page to load awfully slow.
Additional info:
The images are pngs, 120x220 and under 50kb. I have found that converting them into jpgs instead of gifs compresses the file size to be between 12kb and 15kb, but anything lower, the images begin to lose color quality and the image color quality is extremely important.
END OF ADDITIONAL INFO
Anyway, my image database is growing and I need the images to only load upon the visitor scrolling up or down to reduce the page load time as much as possible so visitors will not be turned off and leave the site.
Thanks!
Oh, here's the plugin, I'm using:
wordpress.org/plugins/ml-slider/

Code optimization techniques in extjs?

I am dynamically creating some controls in a page. it will become slow when we have some fifty controls.
what are the code optimization techniques/ guideline used in extjs?
Is there any specific methods which will slow down the entire loading?
Sencha has great posts:
Ext JS 4.1 Performance about:
Network latency which affects initial startup time heavily, but also data store load time.
CSS processing.
JavaScript execution.
DOM manipulation.
Optimizing Ext JS 4.1-based Applications about optimization tips and the Page Analyzer tool.
My tips are
Use Ext.container.Container rather than Ext.panel.Panel.
Instead of adding ext components, use XTemplate with data view to load similar controls.
if you are using many images then use image sprites - An image sprite is a collection of images put into a single image. A web page with many images can take a long time to load and generates multiple server requests.
Using image sprites will reduce the number of server requests and save bandwidth.
http://css-tricks.com/css-sprites/