belaviyo / save-images

Save loaded images in nested iframe pages
https://webextension.org/listing/save-images.html
254 stars 61 forks source link

Dealing with data-srcset #94

Open Patty-OFurniture opened 5 months ago

Patty-OFurniture commented 5 months ago

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

belaviyo commented 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.

Patty-OFurniture commented 3 months ago

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.