We are safe to use the new release of Blazy, after the hook updates
I'm testing heavily as Lazy loading + Blur effect is the trend these days.
We can find this in almost all pages on the internet.
Using the current way of blur image - get the original shape for the placeholder image.
But in many cases, another shape may get used
For Example:
The Current Blazy DEV work as follows - loading the original uploaded shape

But what needed is to have the place holder image in the same shape as the current needed responsive Image style

square 1:1, circle 1:1, or other sizes like 4:1
https://www.youtube.com/watch?v=xbMClT-x_g8
#3107324: Add support for latest blazy loading new logic on responsive image styles
Comments
Comment #2
rajab natshahComment #3
rajab natshahComment #4
rajab natshahComment #5
gausarts commentedThere is Aspect ratio option named Fluid (auto sounds a better name, Fluid was taken from Fluid layout). It was meant for the deprecated custom multi-breakpoints image (#3105243: Shall we keep or drop custom breakpoints? Your vote counts) like Responsive Image, but output as
IMGwithSRCSET, not PICTURE.Please clarify:
Any improvement is very much welcome to the current limitation, of course.
Not related to your screenshots. As I saw you put images in grids, I just noticed there is a regression from RC3 for when any grid value is set to 1, likely for mobile version:
https://git.drupalcode.org/project/blazy/blob/8.x-2.x/src/BlazyGrid.php#L95
It should remove the condition that says
&& $settings['grid_' . $grid] > 1:Should be like RC3 without that condition:
https://git.drupalcode.org/project/blazy/blob/8.x-2.0-rc3/src/BlazyGrid....
Will provide a fix for this tonight, or so.
Comment #6
rajab natshahNoted; On your time.
Thanks a lot, Gaus!! :)
We are safe to use the new release of Blazy, after the hook updates
I have noticed the following:
The Responsive image 1px placeholder
will load with the Image effect
If we have the Responsive image 1px placeholder + Image effect it will load them both
is it logical when we select Image effect to ignore the 1px placeholder?
Not very sure that it's overriding at this time
Thanks a lot for working in all-new improvements
I will test converting our custom effect to use hook_blazy_image_effects_alter()
Comment #7
rajab natshahComment #8
rajab natshahComment #9
rajab natshahYes, I'm using many different shapes + different grid arrangements using views bootstrap + Responsive Image styles
I'm testing with https://github.com/vardot/varbase_vmi_demo
Updated the full testing cases - after your latest changes.
dev---varbase8c1blazy--2020-02-03_21-52-23.tar.gz
dev---varbase8c1blazy--2020-02-03_21-52-23-db.sql.tar.gz
I have updated my site to your latest dev for real data example
http://rajab.natshah.com
Comment #10
gausarts commentedThank you for giving the latest Blazy a whirl, Rajab. Truly appreciated.
AFAIK, both uses the same
SRCattribute, and the image effect is set to win. Having them both with says one, hence image effect, stored in a data attribute might need some extra work, which I can't afford for now. Aside from the fact that the image for effects can be very small below 50px. However patches are very much welcome. Thanks.I have added a temp fix for this with the latest commit today, so Aspect ratio Fluid should "work" with both Picture and regular Responsive image now, hopefully. I haven't thoroughly tested the fix against various setups so I might still miss anything.
The latest fix also makes it possible to embed Blazy (specifically related to the troublesome Aspect ratio Fluid which was previously broken) outside blazy-related plugins, hence without Blazy container, such Views Bootstrap, etc. The regular Views gotcha applies, checking or unchecking Use field template is normally the solution.
I am still working out few more TODOs before releasing a new RC, hopefully next week, if not sooner.
Comment #11
gausarts commentedThe Fluid or auto aspect ratio had been really tough works this far. It appears to work correctly in the past few releases, though. Not perfect due to Picture nature is different from regular Responsive image. Just works.
Closing this, unless anything else to do here. Thanks.
Comment #12
rajab natshahNoted; thank you Gaus for all your work on Blazy.