Thumbnail extension Thumbnail extension
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Thumbnail extension

Started by Patrick1, October 09, 2011, 04:23:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrick1

I'd like the coppermine generated thumbnails to have a jpg extension, even if the uploaded file is PNG. I've looked in the admin config, but can't find any setting related. Is it possible to configure (force) the extension? If not, what hook can I use to change the IM command?

ΑndrĂ©

Seems that there's no plugin hook yet. Have a look at include/picmgmt.inc.php and you'll find
$thumb = $CONFIG['fullpath'] . $filepath . $CONFIG['thumb_pfx'] . $filename;

Afaik if you now replace the file extension with ".jpg" all thumbnails will be created as jpg files. I'm currently not sure if they will be found for images (i.e. if the custom thumbnail routine also works for image files), but I'm sure you'll tell us :)