Php: [gd][php5.6] Not support Webp

Created on 16 Mar 2020  路  4Comments  路  Source: docker-library/php

run docker command:

FROM php:5.6.37-fpm-stretch
RUN apt-get update && apt-get install -y libwebp-dev \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \
    && docker-php-ext-install gd

output:

Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
configure: WARNING: unrecognized options: --with-webp-dir

Most helpful comment

--with-webp-dir is only supported on PHP 7+. Did you try https://stackoverflow.com/questions/22786201/how-to-compile-php-to-enable-webp-support?

All 4 comments

--with-webp-dir is only supported on PHP 7+. Did you try https://stackoverflow.com/questions/22786201/how-to-compile-php-to-enable-webp-support?

but php installed via deb-package has support gd webp format

php -v
PHP 5.6.37-1+0~20180910100434.3+stretch~1.gbp606419 (cli) 

php -r 'print_r(gd_info());'
Array
(
    [GD Version] => 2.2.4
    [FreeType Support] => 1
    [FreeType Linkage] => with freetype
    [T1Lib Support] => 
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 1
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 1
    [XBM Support] => 1
    [WebP Support] => 1
    [JIS-mapped Japanese Font Support] => 
)

Did you read and try --with-vpx-dir=?

--with-webp-dir is only supported on PHP 7+. Did you try https://stackoverflow.com/questions/22786201/how-to-compile-php-to-enable-webp-support?

oh, my mistake, in 5.6 usage --with-vpx-dir parameters. Thanks

Was this page helpful?
0 / 5 - 0 ratings