Photon not resizing images correctly
-
Hi,
I have a website with lots of photos. I tweaked the code of the theme so that photos get cropped from top center.
When I enabled photon, it is re-sizing/cropping the photos from the middle. I saw in a previous thread on this link a fix for this. So I included this fix in the functions.php file and changed the line
if ( is_single() ) {
$args = array(
‘crop’ => ‘50,50,200px,200px’,
to:if ( is_single() ) {
$args = array(
‘fit’ => ‘600px,600px’,This made the display of images in the single post right, but now the site is displaying a weird image on the home page and other thumbnails are not resized correctly although I also changed the line
// resizing on other pages
else {
$args = array(
‘resize’ => ‘200,400’,
);
}to:
// resizing on other pages
else {
$args = array(
‘fit’ => ‘300,200’,
);
}Any help is appreciated.
I since disabled photon on my site https://www.celebritiesreport.com
- The topic ‘Photon not resizing images correctly’ is closed to new replies.