Skip to content

[Bug]: Regenerate Thumbnails hangs with both JIMP and Sharp #2476

Description

@pentastich

Operating system

Linux Fedora 43

Publii version

0.47.4 (build 17402)

Post editor

None

Bug description

The application hangs on any use of the "Regenerate Thumbnails" tool.

  • This is repeatable with both JIMP (at 31%) and Sharp (after just a few files).
  • All of the logs and attachments I'm providing are for Jimp.
  • If I hit "cancel" the system responds, sometimes with an error (I've attached a screenshot).
  • After regenerating, it appears that a number of the thumbnails that WERE generated are corrupt.
  • All of the non-thumbnail JPEG files check OK with "jpeginfo", and the PNG files can be converted with ImageMagick, so it doesn't look like the images are corrupted.

Some additional context:

  • I upgraded to Fedora 43 from Fedora 42 in December.
  • Prior to upgrading to Fedora 43 I have run "Renerate thumbnails" multiple times. I used the "Sharp" generator prior to this problem without issue.
  • I have run Publii successfully since upgrading, but did NOT run "Regenerate thumbnails" on Fedora 43 until today.
  • I upgraded to the latest version of Publii today, prior to running "Regenerate thumbnails".
  • I also updated the "personna-free" theme, and merged the changes into my customizations.
  • I also updated "lucideIcons".
  • I use Simple Lightbox Gallery.
  • I tried downgrading to an earlier version of Publii, and the problem still happened.
  • I installed Publii using the RPM.
  • The website contains 798 images, totalling 549 MiB in size, of which 777 are JPEG files and 21 are PNG files.
  • The website is https://gorgerowing.ca/

Here is the message displayed after hitting "Cancel":

Image

Here are the corrupt JPEG files that I found. I have attached the original JPEG files for these, and for the last file reported in the "regenerate-process" log. Unfortunately, I don't think you'll find anything special about the files, as I created a test project with a gallery containing those four files and was able to use "regenerate thumbnails" using both JIMP and Sharp.

$ find . -iname \*.jpg -print0 | xargs -0 jpeginfo --check | grep -v ' OK *$'
./media/posts/103/gallery/20210626_0058-web-thumbnail.jpg    0 x    0  0bit N                                0 ERROR   Empty input file
./media/posts/121/gallery/IMG_9044-2025-06-08-group-on-dock-web-thumbnail.jpg    0 x    0  0bit N                                0 ERROR   Empty input file
./media/posts/139/gallery/Photo-2025-12-11-6-08-30-PM-web-thumbnail.jpg    0 x    0  0bit N                                0 ERROR   Empty input file

Here are the three files for which empty "-thumbnail" files were generated. I should add that the system sucessfully generated "-xs", "-md", "-lg", "-xl", and "-sm" versions of these file!

./media/posts/103/gallery/20210626_0058-web.jpg

Image

./media/posts/121/gallery/IMG_9044-2025-06-08-group-on-dock-web.jpg

Image

./media/posts/139/gallery/Photo-2025-12-11-6-08-30-PM-web.jpg

Image

And here is the last image that the system logged. There were no "-anything" files generated for this file:

./media/posts/111/gallery/PHOTO-2023-06-20-21-36-211-web.jpg

Image

The "jpeginfo --check" program does not report an issue with any of these files.

$ jpeginfo --check ./media/posts/103/gallery/20210626_0058-web.jpg ./media/posts/121/gallery/IMG_9044-2025-06-08-group-on-dock-web.jpg ./media/posts/139/gallery/Photo-2025-12-11-6-08-30-PM-web.jpg ./media/posts/111/gallery/PHOTO-2023-06-20-21-36-211-web.jpg
./media/posts/103/gallery/20210626_0058-web.jpg 1600 x 1067 24bit N JFIF,IPTC,Exif,ICC,XMP    829003 OK      
./media/posts/121/gallery/IMG_9044-2025-06-08-group-on-dock-web.jpg 1600 x 1067 24bit N JFIF,Exif,XMP             642252 OK      
./media/posts/139/gallery/Photo-2025-12-11-6-08-30-PM-web.jpg 1200 x 1600 24bit N JFIF,Exif,ICC,XMP         809081 OK      
./media/posts/111/gallery/PHOTO-2023-06-20-21-36-211-web.jpg  768 x 1024 24bit N JFIF                      118044 OK      

Steps to reproduce

  1. Install Fedora 43.
  2. Launch Publii
  3. Set JIMP as the thumbnail generator.
  4. Go to "Tools & Plugins"
  5. Run "Regenerate thumbnails"
  6. Wait

Relevant log output

regenerate-errors.log

/opt/Publii/resources/app.asar/node_modules/@jimp/plugin-resize/dist/modules/resize.js:30
    throw new Error("Invalid settings specified for the resizer.");
    ^

Error: Invalid settings specified for the resizer.
    at Resize.initialize (/opt/Publii/resources/app.asar/node_modules/@jimp/plugin-resize/dist/modules/resize.js:30:11)
    at new Resize (/opt/Publii/resources/app.asar/node_modules/@jimp/plugin-resize/dist/modules/resize.js:23:8)
    at Jimp.resize (/opt/Publii/resources/app.asar/node_modules/@jimp/plugin-resize/dist/index.js:62:24)
    at Jimp.<anonymous> (/opt/Publii/resources/app.asar/back-end/image.js:393:39)
    at Timeout._onTimeout (/opt/Publii/resources/app.asar/node_modules/@jimp/core/dist/index.js:201:12)
    at listOnTimeout (node:internal/timers:588:17)
    at process.processTimers (node:internal/timers:523:7)

Node.js v22.21.1

-----------------------------------------

The tail of "regenerate-process.log":

PROGRESS: 244 817
(i) Gallery image detected (005-2024-come-try-rowing-launching.jpg) 82/gallery
PROGRESS: 245 817
(i) Gallery image detected (20260111_0024-web.jpg) 138/gallery
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
PROGRESS: 246 817
(i) Gallery image detected (IMG_2289-web.jpg) 112/gallery
PROGRESS: 247 817
(i) Gallery image detected (20251018_0040-2048.jpg) 134/gallery
PROGRESS: 248 817
PROGRESS: 249 817
(i) Content image detected (rainbow-kitchen-600x400.png) 97
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
PROGRESS: 250 817
(i) Gallery image detected (009-20210711-38-702x468-web.jpg) 102/gallery
PROGRESS: 251 817
(i) Gallery image detected (009-20220530-286-1250x833-web.jpg) 101/gallery
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
PROGRESS: 252 817
(i) Gallery image detected (20230528_0020-web.jpg) 100/gallery
PROGRESS: 253 817
(i) Gallery image detected (victoria-tug-and-barge-normalized.png) 107/gallery
PROGRESS: 254 817
(i) Gallery image detected (006-20241221-40-web.jpg) 33/gallery
PROGRESS: 255 817
(i) Gallery image detected (PHOTO-2023-06-20-21-36-211-web.jpg) 111/gallery
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1
JIMP COVER 768  x  -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions