Skip to content

Build PHP GD with WebP support - #63

Open
helioha wants to merge 1 commit into
mainfrom
gd-webp-support
Open

helioha wants to merge 1 commit into
mainfrom
gd-webp-support

Conversation

@helioha

@helioha helioha commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Any Drupal image style with a Convert → WebP effect fails to generate locally:

Unable to generate the derived image located at public://styles/thumbnail/public/....png.webp.

The image URL returns a 500 and the page shows a broken image. On ucdcweb, 5 of 23 image styles (thumbnail, medium, large, wide, media_library) convert to WebP, so staff photos, course and instructor images, and campus logos are all broken locally. That also made the new Playwright visual regression suite report false failures against live.

Change

  • docker-php-ext-configure gd --with-jpeg --with-webp
  • Install libwebp-dev explicitly. It was already in the image, but only as an indirect dependency.

🤖 Generated with Claude Code

Drupal core's image styles can convert derivatives to WebP, but GD was
configured with --with-jpeg only, so imagewebp() is missing and every
WebP-converting style fails locally with "Unable to generate the derived
image". Add --with-webp and install libwebp-dev explicitly (it was only
present as an indirect dependency).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@helioha
helioha requested a review from shaundrong October 8, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants