Thumbnail icon indicating copy to clipboard operation
Thumbnail copied to clipboard

How to set size of the thumbnail?

Open mowais-ac opened this issue 5 years ago • 4 comments

As I see getThumbnail() function, it doesn't accept width and height as argument, Can anyone guide me how can I set the width and height of the image?

$video_path = $path . '/' .$filename;
$thumbnail_path = public_path().'/uploads/tutorial-thumbnails';
$thumbnail_filename = $originalFilenameWithExt . '.jpg';
$time_to_image = 1;
$thumbnail_width  = 320;
$thumbnail_height = 240;

$thumbnail = new Thumbnail();
$thumbnail_status = $thumbnail->getThumbnail($video_path, $thumbnail_path, $thumbnail_filename, $time_to_image);

Thanks in Advance

mowais-ac avatar Mar 31 '20 19:03 mowais-ac

You can configure it in .env file . You can refer here

Set the following in .env file

#Thumbnail image dimensions
THUMBNAIL_IMAGE_WIDTH  = 320
THUMBNAIL_IMAGE_HEIGHT = 240

lakshmaji avatar Apr 07 '20 15:04 lakshmaji

When i set the #Thumbnail image dimensions THUMBNAIL_IMAGE_WIDTH = 320 THUMBNAIL_IMAGE_HEIGHT = 240

Then the thumb image show in comprise mode. But i want to need original size with water mas

How can i do it

ramkumawathis avatar May 04 '21 13:05 ramkumawathis

With the water mas and image dimension:- image

Without water mas image

ramkumawathis avatar May 04 '21 13:05 ramkumawathis

Could you check whether the image that is using for watermark has opacity / blur radius !

lakshmaji avatar May 06 '21 17:05 lakshmaji