Open Patty-OFurniture opened 5 months ago
Nice, but here, we are not supposed to pick a source. The user decides the size, so we need to grab as many resources are we can.
Hi, I think if there is not a size that matches the selected size, no image will be saved?
Maybe it could be "Prefer size X or pick closest one"? I agree, it is not a simple problem. Feel free to close as WONTFIX.
With data-srcset, I get several garbage files, some acceptable, and one "best" image. All the same, different resolutions of course. I added a best selector to the little-used "no lazy load" plugin by Tension Extension, maybe you can add a similar option? I still have testing and fixes to make, but combining the two works perfectly for me now.
Of course, I'm only choosing what appears to be the largest image, you have file size and dimension options that complicate it. But, here is my naive attempt in case it is helpful. Maybe as an example of what not to do ha!
https://github.com/Patty-OFurniture/no-lazy-load/tree/main