Blog images being cropped/resized

Hi

Thank you for the great theme.

Is there a way to stop the blog images being cropped/resized? (eg on the frontpage under latest news)

Thank you.

Hello @gcneal,

The blog posts automatically get cropped and resized to 360x213px

You might want to use this type of ratio images, just multiple the values and crop your featured images to match this ratio.

Regards

Hi

Thanks for your reply.

I think it might be 2 problems.

  1. The auto cropping(resizing) is cropping important information off the photos to start with. Some photos are portrait which makes it difficult to fit 360px/213px ratio.

Can the cropping be disable?

Do I delete add_image_size( ‘illdy-front-page-latest-news’, 360, 213, true ); from the functions.php? and delete all 360px/213px size images?

  1. When the browser is resized it appears to zoom (again cutting important information off and/or gives a pixelated effect.) EG depending on the screen size the images change from 360px/213px to 293.325px/213px to 345px/213px to 722.800px/213px and so on.

It appears the image height remains at 213px.

I thought if I added 100% or auto to my child theme it would fix this, however it seems to remove the image altogether.

#latest-news .section-content .post .post-image {
width: auto;
height: auto;
}

Thank you

Hello @gcneal,

Can you please provide the website link, as well?

I suspect that if you delete the image resize, like you pointed out, and regenerate the thumbnail afterwards, you might fix the issue. But in this case you might need some additional CSS rules, as well…

Additional, there’s some new WordPress features that take over the multiple pictures size for mobile sakes, so I’ll start an investigation on how to improve these section.

Let me know the website link, if it’s not on local development and meanwhile try to alter the resize function and see if it works

Regards

Hi

Thanks for your reply.

The site in question is not public, however I’m working on another site (although not meant for public yet, it is online).

Ok, I deleted add_image_size( ‘illdy-front-page-latest-news’, 360, 213, true ); with the effect of no change to the site, however when new images are added they do not create the 360px/213px size, so looks like that fixes that.

I then deleted the additional image 360px/213px. when the page is refreshed I ended up with a white space/no image. So readded a new feature image at full size (but the top and bottom cant be seen, eg hidden but there using the full size image).

Now if I change the height too 100% or auto the images do not show, if I change to 500px it works but not all images would be 500px.
#latest-news .section-content .post .post-image {
height: 500px;
}

Any ideas?

Thank you

Hello @gcneal,

I need to further investigate both issues, the resizing (where TBH I’m not really confident I can provide to much help) as well as the bootstrap collapse links.

Sorry for all the trouble.

Will get back to you as soon as possible.

Regards

Hey all,

I found a slight fix for those being affected with loss of image quality when you upload your feature image.
In the function.php accessed via FTP under the theme folder edit the following and add the two lines.

After completing you may need to clear your browser cache, any future uploads of images should be fine.

Linked my function page not sure if it will work for you but good luck!

hope this helps!

		// Add Image Size
		if ( ! function_exists( 'vw_add_image_sizes' ) ) {
			function vw_add_image_sizes() {
		add_image_size( 'illdy-blog-list', 750, 500, true );
		add_image_size( 'illdy-widget-recent-posts', 70, 70, true );
		add_image_size( 'illdy-blog-post-related-articles', 240, 206, true);
		add_image_size( 'illdy-front-page-latest-news', 250, 213, true );
		add_image_size( 'illdy-front-page-testimonials', 127, 127, true );
		add_image_size( 'illdy-front-page-projects', 476, 476, true );
		add_image_size( 'illdy-front-page-person', 125, 125, true );
	}
}

hi there

@miqdad thank you for sharing solution :slight_smile:
but since this ticket is very old i will close this case now, thank you once again