WIP: Understand Imgix use in Twill esp. around crop/fit usage. Seeing w= h= to have massive gains versus rect= #866
Unanswered
peterabarry
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Short question: Is there a way to tune w= and h= ( or maxes) as well / instead of rect= for Imgix that respects aspect ratios to help auto handle user uploading really large images ( both in terms of data and physical dimension size)?
More rambling so far:
We are wrestling with this ourselves and below I try to explain it but its long-winded at the moment as we are still trying to confirm enough of the way things work to provide actual useful questions! When playing manually I get 15Mb image down to 500Kb with no percieved reduction in quality or size, presumably because the original dims are so large the browser is auto scaling them down to the window. But until I know more about Imgix I am not sure I can for certain just go around sprinkling w=/h=/max-w/max-h, nor do i even know if Twill is exposing it.
If anyone does think they gracefully handle too large images in Imgix OOTB what am I missing?
But our observation is that large images 6000x6000 + do not get auto resized down. Even though we have configured the display/platform specific crops CMS side, and are querying these correctly from Imgix, the rect= property seems set, but there is not any h= w= , or maxw maxh set. When manually copying the URLs I was able to save a further 80-90% size in such cases just by say forcing a max height and width to 2000x2000. I think with clip=fit ( TBC).
Looking into the source code I can see that there is crop handling which sets rect but I cannot see how to set w or h.
Because I am still not knowledgeable enough on the Imgix configuration, I am not sure of the optimal way to tune this so that when a CMS user does upload a massive original image, we can appropriately downsize/scale it while preserving the aspect ratios in any display/screen crop configuration, ideally in a way that is consistent with defaults OOTB.
It is very common that users upload large images and part of the whole point of using Twill+Imgix, but at a few extreme images it seems to fail for us, and as I say tinkering manually with w= h= seemed to immediately offer massive gains, without actually altering the onscreen appearance ( presumably as browser is downscaling it anyway to fit on my screen). I am talking images that go from 12mb to 500Kb. but still take up half/whole screen after downsizing.
Beta Was this translation helpful? Give feedback.
All reactions