edbizarro / gitlab-ci-pipeline-php

:coffee: Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
https://hub.docker.com/r/edbizarro/gitlab-ci-pipeline-php
MIT License
528 stars 166 forks source link

WebP support #90

Closed INOVAdev-joost closed 4 years ago

INOVAdev-joost commented 4 years ago

GD is loaded without WebP support:

$ php -r 'var_dump(gd_info());' 00:02 Command line code:1: array(13) { 'GD Version' => string(26) "bundled (2.1.0 compatible)" 'FreeType Support' => bool(true) 'FreeType Linkage' => string(13) "with freetype" 'GIF Read Support' => bool(true) 'GIF Create Support' => bool(true) 'JPEG Support' => bool(true) 'PNG Support' => bool(true) 'WBMP Support' => bool(true) 'XPM Support' => bool(false) 'XBM Support' => bool(true) 'WebP Support' => bool(false) 'BMP Support' => bool(true) 'JIS-mapped Japanese Font Support' => bool(false) }

Any hints on how to enable this option? Tried reconfiguring GD with WebP enabled but I run into different problems and i'm not sure how to continue from here.

- sudo docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/
- sudo docker-php-ext-install gd
- docker-php-ext-enable gd

INOVAdev-joost commented 4 years ago

I just cloned the repository and made some changes to support WebP and it's works for me: + libwebp-dev \

- && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \

- && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \

extensions.sh.txt

Any chance on adding this to your repository ?

edbizarro commented 4 years ago

hi @INOVAdev-joost would you mind make a PR with theses changes? thanks!