lakshmaji/Thumbnail

How to set size of the thumbnail?

Opened this issue · 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

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

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

With the water mas and image dimension:-
image

Without water mas
image

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