Can't Upload Image On Blog Option With (PHP 7.4 & Joomla 4) - Question | JoomShaper

Can't Upload Image On Blog Option With (PHP 7.4 & Joomla 4)

Dinuka

Dinuka

General 1 year ago

Previously i posted about can't upload image on blog option in Gazette joomla 4 template with PHP 8.0. https://www.joomshaper.com/forum/question/23552

As per the support answer given, i reinstall with PHP 7.4. But Still same issue.

0
4 Answers
Dinuka
Dinuka
Accepted Answer
1 year ago #114232

Hi All

I solve this error by changing as below. But i think there should be proper solution for this.

namespace HelixUltimate\Framework\Platform\Classes;

defined('_JEXEC') or die();

/**

  • Image manipulation class.

  • @since 1.0.0 */ class Image { public static function createThumbs($src, $sizes, $folder, $base_name, $ext, $quality = 100) {

             list($originalWidth, $originalHeight) = getimagesize($src);
    
             switch ($ext)
             {
                     case 'bmp':
                             $img = imagecreatefromwbmp($src);
                             break;
                     case 'gif':
                             $img = imagecreatefromgif($src);
                             break;
                     case 'jpg':
                             $img = imagecreatefromjpeg($src);
                             break;
                     case 'jpeg':
                             $img = imagecreatefromjpeg($src);
                             break;
                     case 'png':
                             $img = \imagecreatefrompng($src); <-- I changed this line. Added a \ in front of the function name. So the native function of GD is used
                             break;
             }
0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 year ago #114351

Hi

Thanks for congtacting us and glad to know that it is solved now. You can now close this post by accepting the answer.

-Regards.

0
Dinuka
Dinuka
Accepted Answer
1 year ago #114379

Dear Mehtaz

it seems to me not a proper solution edit default codings

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 year ago #114541

Ok I will note it down so that we can get a proper solution in near future, in the meanwhile you can use this one.

0