[Plugin: Cool Video Gallery] Preview Image Size Solution
-
Hello.
I love the gallery. The only issue I had with the gallery is that when I attempted to upload a preview image with the size of my choice, it uploaded a 100×100 preview image instead.
It says in the plugin description that I should be able to upload image of any size.
So I think I found the problem.
In the file cool-video-gallery\lib\core.php, there is a line of code:
... $thumb_width = $options['cvg_preview_width']; $thumb_height = $options['cvg_preview_height']; ...
and right underneath it you have:
$image_details = @getimagesize($dest_file); if($image_details[0] > $thumb_width && $image_details[1] > $thumb_height){ $new_file = image_resize( $dest_file, $thumb_width, $thumb_height, $crop, 'thumbs', NULL, $thumb_quality );
Well if I’m not mistaken this basically reads, “if the width and height of the uploaded image is greater than the default (where $thumb_width and $thumb_height are both 100px’s), then change the size BACK to the default (which is 100 x 100).”
..which of course negates the option of uploading a image size of your choice..
So I in the file cool-video-gallery.php, I just changed
$options['cvg_preview_height'] = 100; $options['cvg_preview_width'] = 100;
to
$options['cvg_preview_height'] = 250; $options['cvg_preview_width'] = 300;
and it worked.
https://www.ads-software.com/extend/plugins/cool-video-gallery/
- The topic ‘[Plugin: Cool Video Gallery] Preview Image Size Solution’ is closed to new replies.