Renaming a data:image/webp;base64, file in php (Imagick)Get the solution ↓↓↓
Is there any way to rename the
so that when someone right clicks to open in a new tab, there's a name instead of encoded text
Below is the code:
<?php $image = new Imagick(); $image->readImage("images/industrial_packaging/".$IndPackProductImageDirName2."/".$IndPackProductImagesArray); $watermark = new Imagick(); $watermark->readImage("images/default_products_image_fg.webp"); $image->compositeImage($watermark, Imagick::COMPOSITE_DEFAULT, 0, 0); $image->thumbnailImage(500, 500, true, true); header("Content-Type: image/" . $image->getImageFormat()); ob_start(); $thumbnail = $image->getImageBlob(); ob_get_contents(); ob_end_clean(); echo " <img class=\"card-img-top\" src=\"data:image/webp;base64,".base64_encode($thumbnail)."\" style=\"background-image: url('images/default_products_image_bg.webp'); background-size:cover;\" /> "; ?>
Any help appreciated!
Share solution ↓
Link To Answer People are also looking for solutions of the problem: method illuminate\database\eloquent\collection::paginate does not exist.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.