Skip to content

Add image format tests for GD, Imagick and vips - #43

Merged
kdambekalns merged 1 commit into
mainfrom
task/test-image-formats
Oct 7, 2026
Merged

kdambekalns merged 1 commit into
mainfrom
task/test-image-formats

Conversation

@kdambekalns

Copy link
Copy Markdown
Member

Add a test script which checks that GD, Imagick and vips can read, manipulate and write JPEG, PNG, GIF, WebP, AVIF and HEIC images inside the built image. It also covers reading SVG, TIFF and the first page of a PDF, and makes sure that transparency and the frames of an animated GIF survive a resize and a write.

A library without an API for a format is reported as skipped. Any other failure, or a format which no library can read or write, fails the run.

A new GitHub Actions workflow builds the image for every supported PHP version on each push and pull request and runs the script in it. The results are added to the job summary and the generated images are uploaded as a build artifact. The base image is pulled from Docker Hub, so the build also works for forks without registry credentials.

The script and its fixtures are a copy of the ones in docker-php. Unlike there, Imagick is expected to read PDF, because this image installs Ghostscript.

Add a test script which checks that GD, Imagick and vips can read,
manipulate and write JPEG, PNG, GIF, WebP, AVIF and HEIC images
inside the built image. It also covers reading SVG, TIFF and the
first page of a PDF, and makes sure that transparency and the frames
of an animated GIF survive a resize and a write.

A library without an API for a format is reported as skipped. Any
other failure, or a format which no library can read or write, fails
the run.

A new GitHub Actions workflow builds the image for every supported
PHP version on each push and pull request and runs the script in it.
The results are added to the job summary and the generated images
are uploaded as a build artifact. The base image is pulled from
Docker Hub, so the build also works for forks without registry
credentials.

The script and its fixtures are a copy of the ones in docker-php.
Unlike there, Imagick is expected to read PDF, because this image
installs Ghostscript.
@kdambekalns kdambekalns self-assigned this Oct 7, 2026
@kdambekalns

Copy link
Copy Markdown
Member Author

Failures to be expected – the base needs flownative/docker-php#68 to be merged and released.

@kdambekalns
kdambekalns merged commit 3980a8f into main Oct 7, 2026
4 of 12 checks passed
@kdambekalns
kdambekalns deleted the task/test-image-formats branch October 7, 2026 16:19
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.

1 participant