Enonic version: 6.4.1
OS: OSX
I’m creating a front page with three pretty heavy (full screen) images. Waiting for these three images to load kind of ruins the user experience.
Being the clever guy I think I am, I created a script that first loads a scaled 100x100 (I use wide
if that has anything to say) version of the image (that looks ugly but resembles the real image). Once the page is loaded, I use some javascript to get the size of the viewport and require a new version of the same image, just in the correct resolution.
This actually works pretty well on subsequent loads, but the first load takes about 7-8 seconds. I’m assuming this is because you’re caching the image after the original resize / scale / filtering, which is fine - but I think 7-8 secs of rendering time really is too slow.
The reason the first load is important (or at least a bit important) is that since I use the viewport size, I’ll get several different requests. One for new iphones, another for older iphones, and n different versions for the different android phones available. Not to mention different laptop resolutions, or a potentially resized screen. I can’t run through all of these configurations to pre-populate the cache on each deploy (or every time I change one of the images), so that’s why it matters.
Am I doing something wrong here, or is this just the state of image resizing in Enonic these days?