szurubooru icon indicating copy to clipboard operation
szurubooru copied to clipboard

Thumbnail rework

Open po5 opened this issue 3 months ago • 0 comments

Higher quality and lower filesize thumbnails with cjpeg (provided by mozjpeg for quality or libjpeg-turbo for speed).

Videos in the upload form now have a preview that matches the final thumbnail.

Thumbnails are now used as placeholder while the full-size image is loading on post pages.
Thumbnail stays if the full-size image load fails. If both pics fail, the transparency grid is shown (if enabled).

Videos have two thumbnails, one taken at 30% into the video (the "custom" thumbnail shown in search results), and one of the first frame (the thumbnail used as a preroll on post pages).

Images are now resized in RGB even for indexed color PNGs. It would lead to ugly dithering that also hurt compression. Before image After image

Thumbnail filenames are prefixed with sample_ to make it clear to the user they didn't download the original image.

po5 avatar Mar 21 '24 23:03 po5