CPMFetch: Crop to fit instead of stretch to fit? CPMFetch: Crop to fit instead of stretch to fit?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CPMFetch: Crop to fit instead of stretch to fit?

Started by ungodlyhour, August 16, 2020, 09:39:07 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ungodlyhour

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:

<!-- .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 -->

ungodlyhour

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

object-fit: cover;