private function processImageUpload($image,$image_name){
//using image png function to change any image from jpeg to png and store to public folder
$img = imagepng(imagecreatefromstring(file_get_contents($image)), config('app.LOGO_MEDIA_PATH').'/'.$image_name.'.png');
/*
* TODO : change the image replacing functionality
* from static name to upload to uploads folder
* and get URL form settings table
*/
$url = "/front/common/img/".$image_name.'.png';
return $url;
}
我在php.ini文件中启用了imagick扩展,但没有发生任何事情
1条答案
按热度按时间ru9i0ody1#
我得到了解决方案。。只是需要添加的图像类型的情况下。在这方面,我们不能转换为png的png。