Skip to content

GD JPEG extension unable to install with PHP 7.4 #913

@zachrattner

Description

@zachrattner

I used to be able to have GD enabled with JPG support in my Dockerfile when my image was based off of php:7.3-fpm-alpine3.10. After upgrading to php:7.4-fpm-alpine3.10, the following line no longer works:

RUN docker-php-ext-configure gd --with-freetype-dir=/usr/lib --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib && \
docker-php-ext-install gd

In PHP 7.4, the configure script gives this error:

configure: WARNING: unrecognized options: --with-freetype-dir, --with-png-dir, --with-jpeg-dir

As a result, once the container is built, JPEG support is not enabled:

# php -r 'print_r(gd_info());'
Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] => 
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 
    [XBM Support] => 1
    [WebP Support] => 
    [BMP Support] => 1
    [TGA Read Support] => 1
    [JIS-mapped Japanese Font Support] => 
)

Is there a recommended way to configure GD with JPG support on PHP 7.4?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions