• Resolved Benedikt Ledl

    (@benniledl)


    Hello,

    I’ve used the plugin for a longer time and it was always working well, today I’ve noticed the .webp versions of new images that I upload are just an empty file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’ve noticed this issue recently on PNG images with transparency that I have shrunk using TinyPNG.com, which seems to convert images colour mode from TrueColorAlpha to PaletteAlpha.

    ?$ identify -verbose?original.png | grep "Type"
    Type: TrueColorAlpha

    ?$ identify -verbose?minified.png | grep "Type"
    Type: PaletteAlpha

    Regenerating the two images

    $ sudo -u apacheuser wp media regenerate 32694 32751 --url=example.com
    Found 2 images to regenerate.
    1/2 Regenerated thumbnails for "minified" (ID 32751).
    Warning: imagewebp(): Palette image not supported by webp in /var/www/example.com/wp-includes/class-wp-image-editor.php on line 572
    2/2 Regenerated thumbnails for "minified" (ID 32694).
    Success: Regenerated 2 of 2 images.

    The result: original works but minified gives a zero size file.

    $ ls -l wp-content/uploads/2025/02/
    -rw-r--r-- 1 apacheuser apachegroup 69166 Feb 11 11:19 wp-content/uploads/2025/02/original.png
    -rw-r--r-- 1 apacheuser apachegroup 20064 Feb 11 11:20 wp-content/uploads/2025/02/original-png.webp
    -rw-r--r-- 1 apacheuser apachegroup 48600 Feb 11 07:56 wp-content/uploads/2025/02/minified.png
    -rw-r--r-- 1 apacheuser apachegroup 0 Feb 11 11:20 wp-content/uploads/2025/02/minified-png.webp

    • This reply was modified 2 weeks, 6 days ago by Jeremy Varnham. Reason: formatting
    Thread Starter Benedikt Ledl

    (@benniledl)

    -rw-r--r-- 1 someuser someuser 13412 2025-02-07 08:18 image-name-1024x576.webp
    -rw-r--r-- 1 someuser someuser 858 2025-02-07 08:18 image-name-150x150.webp
    -rw-r--r-- 1 someuser someuser 25160 2025-02-07 08:18 image-name-1536x864.webp
    -rw-r--r-- 1 someuser someuser 2052 2025-02-07 08:18 image-name-300x169.webp
    -rw-r--r-- 1 someuser someuser 9086 2025-02-07 08:18 image-name-768x432.webp
    -rw-r--r-- 1 someuser someuser 33812 2025-02-07 08:18 image-name.png
    -rw-r--r-- 1 someuser someuser 0 2025-02-07 08:18 image-name-png.webp
    Thread Starter Benedikt Ledl

    (@benniledl)

    Thanks for the tip @jvarn13

    I now re-exported the problematic images in sRGB format and it is working again.

    Do you know the image-name.png colour type?

    identify -verbose image-name.png | grep "Type"

    If it is PaletteAlpha or Palette, this might be the same problem (webp not supporting palette colour types causing the conversion to fail).

    PNG color types:

    Grayscale Only shades of gray, no color, no transparency.
    TrueColor Full RGB colors, no transparency.
    Indexed (Palette) Uses a limited palette of colors (indexed color mode).
    GrayscaleAlpha Grayscale with transparency.
    TrueColorAlpha Full RGB colors with transparency (RGBA).
    PaletteAlpha Indexed (palette-based) colors with transparency.

    Great! You posted your second reply as I was still writing ??

    Thread Starter Benedikt Ledl

    (@benniledl)

    Even tho the problem was solved for me, I’ll still document this here if anyone needs it in the future.

    The type of these broken images is “Palette”.

    identify -verbose problem-image.png | grep "Type"
    Type: Palette
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.