qsniyg / maxurl

Finds larger/original versions of images and videos
https://qsniyg.github.io/maxurl/
Apache License 2.0
1.05k stars 64 forks source link

Lofter sometimes downloads pngs as jpgs #1177

Open contextnerror opened 1 year ago

contextnerror commented 1 year ago

When downloading images from the popup, sometimes pngs are downloaded as jpgs. I only noticed because ExifTool threw an error saying the extension was wrong. An example post with this problem is https://ceciliasong0729.lofter.com/post/1e611574_2b737de16

Not all posts with pngs seem to have this issue. https://w-w-one.lofter.com/post/1ccd5f1b_2b73c26e2 works fine.

qsniyg commented 1 year ago

I'm not sure if this can easily be fixed on the userscript's side. It could potentially check if the received content-type doesn't match the extension, then redirect to the correct version. I'll leave this open though :) Perhaps a somewhat more generic solution could be implemented, as I assume Lofter isn't the only website with that problem.