GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
21.82k stars 1.53k forks source link

Allow for copying the compressed image #1371

Open gBasil opened 1 year ago

gBasil commented 1 year ago

When using Squoosh, I usually end up just downloading the image, copying and pasting it somewhere in the browser, and then deleting the file. It would be a lot nicer if it would be possible to just copy the compressed image in order to avoid that song and dance.

surma commented 1 year ago

You can right click -> copy image

Screenshot 2023-07-04 at 12 24 37

However, keep in mind that image clipboards in most OSes will copy the bitmap, not the compressed binary data. So while you will get resizing applied and will get the compression artifacts, you won’t get the compression benefits wrt file size.

gBasil commented 1 year ago

So while you will get resizing applied and will get the compression artifacts, you won’t get the compression benefits wrt file size.

Ah, that's unfortunate. :sweat_smile: I was more thinking about an event handler for ctrl+c that would write the fully compressed file to the clipboard.

seguri commented 1 year ago

@surma is it only the right-click "copy image" suffering from this issue, or also an eventual "copy" button implemented alongside the download one?