Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CPMFetch: Crop to fit instead of stretch to fit?  (Read 431 times)

0 Members and 1 Guest are viewing this topic.

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
CPMFetch: Crop to fit instead of stretch to fit?
« on: August 16, 2020, 09:39:07 pm »

I found some code on here (thread) that worked to resize the thumbnails on my blog (cxhnow.com), and it works well except for the fact that landscape images have a stretched or warped look (screenshot attached). Is there any code I can add to my WordPress sheets so I can fix the landscape images?

Here's my current code:

Code: [Select]
<!-- .cpmfetch code starts here -->
<?php
include "./gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$options = array(windowtarget => '_blank''imagewidth' => "108""imageheight" => "133",'alttag' => '{{pHits}} Views');
$objCpm->cpm_viewLastAddedMedia(1,9,$options);
$objCpm->cpm_close();
?>

<!-- .cpmfetch code ends here -->
Logged

ungodlyhour

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: CPMFetch: Crop to fit instead of stretch to fit?
« Reply #1 on: August 16, 2020, 10:25:43 pm »

For anyone else with this problem, just add this to your CSS sheets.

Code: [Select]
object-fit: cover;
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 19 queries.