Skip to content

Build PHP GD with WebP support - #63

Merged
helioha merged 1 commit into
mainfrom
gd-webp-support
Oct 12, 2026
Merged

helioha merged 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

@kurowski kurowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@helioha
helioha merged commit 1a26d4d into main Oct 12, 2026
1 check passed
@helioha
helioha deleted the gd-webp-support branch October 12, 2026 19:20
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.

3 participants