Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved undefined function imagecreatefromjpeg #3210

Merged
merged 1 commit into from
May 27, 2022
Merged

Solved undefined function imagecreatefromjpeg #3210

merged 1 commit into from
May 27, 2022

Conversation

rc1021
Copy link
Contributor

@rc1021 rc1021 commented May 6, 2022

Description

[Solved] Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg()

PHP 7.4 Changelog in GD section in PHP 7.4(Alpine)

we can run docker-php-ext-configure command to configure our gd with JPEG support.
we don't need to provide flag to enable PNG.

$ docker exec -it laradock_php-worker_1 php -r 'print_r(gd_info());'
Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] => 1
    [FreeType Linkage] => with freetype
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 1
    [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] => 
)

Motivation and Context

Types of Changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Definition of Done Checklist:

  • I've read the Contribution Guide.
  • I've updated the documentation. (refer to this for how to do so).
  • I enjoyed my time contributing and making developer's life easier :)

[Solved] `Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg()`

[PHP 7.4 Changelog](https://www.php.net/manual/en/migration74.other-changes.php) in GD section

we can run docker-php-ext-configure command to configure our gd with JPEG support. 
we don't need to provide flag to enable PNG.

```
$ docker exec -it laradock_php-worker_1 php -r 'print_r(gd_info());'
Array
(
    [GD Version] => bundled (2.1.0 compatible)
    [FreeType Support] => 1
    [FreeType Linkage] => with freetype
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 1
    [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] => 
)
```
@bestlong bestlong merged commit 27cb551 into laradock:master May 27, 2022
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.

2 participants