GD2 removed in PHP 8.0

  • Hi, I just upgraded to PHP 8.0 and can't upload any images to my gallery because GD2 no longer works. In v8.0, PHP Has renamed the extension file to simply, "php_gd.dll". I tried switching the image processor back to GD, but JoomGallery thinks that's GD1 and that doesn't work anymore either. Now I think I need to get ImageMagick installed if I can't use GD2 anymore.


    Will there be a patch or a fix for this soon?

  • Ok, ImageMagick gives me this:


    g85001.jpg 237.9kB No file has been uploaded!

    ___Debug___

    Filename: g85001.jpg

    Upload complete (File-Size: 237.89 KB)

    Resizing to height using ImageMagick...

    ERROR: Server problem. The following statement could not be executed in the php code: 'exec(convert -strip -resize "133x99" -quality "100" -unsharp "3.5x1.2+1.0+0.10" "J:\gallery\images\joomgallery\originals\gallery_85_2\g85001_20210617_1630637610.jpg" "J:\gallery\images\joomgallery\thumbnails\gallery_85_2\g85001_20210617_1630637610.jpg");'

    Error creating thumbnail 'J:\gallery\images\joomgallery\thumbnails\gallery_85_2\g85001_20210617_1630637610.jpg'


    Rollback: Deletion of original image successful


    Not sure what to do now. :(

  • Ok, wait, I think it's working now. In PHP.ini (for 8.0), in the [Extensions] area, it had extension=php_gd2.dll. I just changed that to php_gd.dll and reloaded IIS, and it seems to be working fine now.


    Sorry for the scare! :/

  • Now I have another problem. Animated GIF files are failing to upload.


    Here's what it says:


    An error has occurred.

    0 GifCreator: v1.0.0: You have to give resource image variables, image URL or image binary sources in $frames array. ()
    Return to Control Panel


    I'm not sure what this is all about. All this since upgrading to PHP 8.0

    • Offizieller Beitrag

    ImageMagick should be independet from your PHP version. I guess there is a problem with imagemagick in general on your server. Are you able to perform -convert with imagemagick directly on your server terminal (SSH)?

    Which ImageMagick version are you using?


    I guess there are some small issues with the joomIMGtools object on php 8.0. I will take a look at it when i get the chance.