erintheunready / ComicControl

The main repo for ComicControl Development.
25 stars 7 forks source link

[Bug] ComicControl silently fails to create thumbnails for WebP images #33

Open JulianWebb opened 2 years ago

JulianWebb commented 2 years ago

ComicControl v4.2.9

Description of Problem

When uploading a .webp image, ComicControl will successfully upload the image to the site, however it will not generate a thumbnail nor give an error.

Steps to Reproduce

  1. On a working install of ComicControl, go to /comiccontrol/image-library
  2. Attempt to upload a .webp image (I would attach one but Github doesn't support them, ironic)
  3. Upload will complete and the image will be successful, but the listing for it on the Image Library page will show a broken file
JulianWebb commented 2 years ago

The cause of this issue appears to be a lack of case-handling for .webp images in /comiccontrol/ajax/img-uploader.php. Implementing imagewebp() there would likely solve the issue.

JulianWebb commented 2 years ago

adding the follow case seems to cause it to function correctly:

case 'webp': imagewebp($slate, $uploadFilename, 100); break;
mrencyc commented 1 year ago

Yes I added that to my fork of comiccontrol and can confirm it does the job.