Tagged: featured image size
-
AuthorPosts
-
July 14, 2023 at 1:55 am #1413263
Greetings,
I have been using the plugin Simple Image Sizes in my site. In it, I had the size for “entry_with_sidebar size” set at maximum width 1032, maximum height 900. This gave the featured images in my Enfold blog posts a nice aspect ratio, roughly 1.91:1 for images uploaded at 1200 x 628px.
Recently, I uninstalled Simple Image Sizes because it now seems unsupported and out of date.
Without the Simple Image Sizes plugin, the featured images in my Enfold blog posts are now the same width, but significantly reduced in height, such the aspect ratio is significantly changed and the top and bottom of the image are truncated. See:
https://centerforworldmusic.org/2016/11/mairtin-de-cogain-irish-storyteller/
How can I get my 1.91:1 aspect ratio back? Is there some CSS code I could add? Basically, as I understand it, I need images that display at 1032px wide and are not constrained as to height.
Thanks for your advice.
Lance
July 15, 2023 at 1:35 am #1413332Hi Lance,
Please add this code in functions.php using a child theme or if you don’t have a child theme, you can use WPCode plugin to insert this php snippet:
function enfold_customization_modify_thumb_size( $size ) { $size['entry_without_sidebar'] = array('width'=>845, 'height'=>321); return $size; } add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
The width and height values are default, so change it as you see fit.
I need images that display at 1032px wide and are not constrained as to height.
please change this part of the code:
$size['entry_without_sidebar'] = array('width'=>845, 'height'=>321);
to
$size['entry_without_sidebar'] = array('width'=>1032);
Then regenerate your images or simply re-upload the image.
Hope this helps.Best regards,
NikkoJuly 15, 2023 at 8:10 pm #1413367Hi Nikko,
This worked. Thanks so much for your help.
FYI: I did have to change ‘entry_without_sidebar’ to ‘entry_with_sidebar’
Cheers! Lance
July 16, 2023 at 12:01 pm #1413393Hi,
Great, I’m glad that Nikko could help you out. Please let us know if you should need any further help on the topic, or if we can close it.
Best regards,
RikardJuly 16, 2023 at 5:06 pm #1413414It worked. Let’s close it!
-
AuthorPosts
- The topic ‘Featured Images Messed Up’ is closed to new replies.