eight04 / image-picka

A Firefox/Chrome extension helping you download images.
MIT License
161 stars 19 forks source link

Images saved in different format then "save page as complete" operation in browser. #319

Closed bumbaras closed 1 year ago

bumbaras commented 1 year ago

Not sure if is it "image picka" fault but I have found a site where images are saved as JPG with quality lower than 100 instead of webp images which are displayed on page, which are saved with "save page as complete on" in browser, and even when clicked on image picka thumbnail and opened in separated tab (also webp). But addon is always saving them as jpg. I have removed default extension jpg in options but without success. If i take links from "copy links" button, the links will also give webp images. And quality in link parameters is set for 100. https://scyllascans.org/read/marriage_of_convenience/en/0/1.0

bumbaras commented 1 year ago

Also it is possible to grey save button in addon to the moment the addon finished operations like caching files? Because on mentioned site the images are long height strips, and i see how the thumbnails are drawing even after green bar of analyzing dissapeared on top of page and i am not sure if clicking save in this moment will give me whole images (images are still drawing on thumbnails), or maybe it is safe to wait some more time ...

eight04 commented 1 year ago

webp images which are displayed on page

The website displays .jpg to me: image

i am not sure if clicking save in this moment will give me whole images

Yes it does.

(images are still drawing on thumbnails)

Thumbnails are hidden when it is not seen to reduce memory usage. Therefore you may experience a "loading" if the image is pretty large.

bumbaras commented 1 year ago

You took most unsignificant image of the group, but it doesn't matter. I was testing links and saved website in firefox only before. I took this one for further test: https://i0.wp.com/api.scyllascans.org/works/ab611ae0-b99b-11ec-9e52-e7ae5413d503/ed333020-b9a5-11ec-9e52-e7ae5413d503/01_copyresult.jpg?strip=all&quality=100&w=720

The result is: wget got the same jpg file Your addon got. total commander new connection got the same jpg.

firefox got webp image with double size: 01_copyresult.jpg (obraz WEBP, 720×9849 pikseli) — Skala (9%) image/webp 1677,62 KB (1 717 878 bajtów) the header is RIFFn6 WEBPVP8Lb6

chrome the same as firefox (webp).

When webp image is processed then quality parameter has meaning for final file. For jpg it seems quality is omitted. Width parameter has meaning in both cases (jpg/webp). Tried to play with user agent in firefox but nothing changed. I don't understand how firefox/chrome decide to get webp instead of jpg. I think original files are jpg and they are converted to webp in browsers. Due to 100 quality value webp files get huge sizes without any noticeable differences.