Tagged: featured images, image resizing
-
AuthorPosts
-
March 8, 2015 at 10:28 am #407641
Hi,
I have a client who snaps a lot of pictures using her phone, therefore, most of the blog posts featured images are of vertical orientation. Is there a way that can somehow allow them to fit in nicely in post view? I managed to tweak the blog view, but the post featured image is just too long, here’s an example: Click HereMy question is what is the best way to deal with such images? Really need help with this guys as I have hit a wall trying different solutions.
March 9, 2015 at 9:45 am #407918Hi erhabi!
In my opinion it would be nicer to have the featured image showing in the same width as the rest of the content. Please get bak to us if you need any help with custom CSS or other modifications.
Regards,
RikardMarch 10, 2015 at 2:29 pm #408831Hi Rikard,
Images that are landscape are no problem, however, images that are portraits is what’s the problem here. For example, if an image of a person is chosen and it’s in portrait format the person’s head gets chopped off and it looks really weird. I was hoping to get an answer on what would be the best way to deal with such images while posting (without having to resort to photoshop, etc. as the client is not at all technical). Appreciate any help with this.
March 10, 2015 at 2:41 pm #408837For example, have a look at the homepage here:
http://www.unitalianaadubai.com/index-uiad.phpand the post:
http://www.unitalianaadubai.com/index-uiad.php/2015/02/a-chat-with-dru-head-midwife-at-health-bay-polyclinic/Is there a CSS tweak you reckon we can do?
March 11, 2015 at 5:07 am #409661Hi!
I think you have to resize the image to at least 1210px before uploading to WordPress. Or install this plugin: https://wordpress.org/plugins/simple-image-sizes/
Go to Settings > Media then set the Cropping parameter of the entry_with_sidebar and entry_without_sidebar thumbnail size to “No”. Update then save changes. Upload the images again or regenerate the thumbnails.
Cheers!
IsmaelMarch 11, 2015 at 2:31 pm #409847Hi Ismael,
Thanks for looking into this. I have tried the above already before you posted and the thing is even if we pre-resize a portrait image or set it’s size without cropping, for example an image of 2160x3840px to 1210px width, we are left with a height of 2151px, which is HUGE for a post image. Now if I was doing the blog posts myself I have no problem resizing my featured images in photoshop and uploading them tweaked or fixed, but the issue is it’s for a client and she’s not really that tech savvy, i’m afraid.
March 12, 2015 at 7:02 am #410322Hey!
I don’t think you can deal with this issue without compromising parts of the images specially when you have images that tall. Please deactivate the Simple Image Sizes plugin then edit functions.php, look for this code:
$avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 ); // images for fullsize pages and fullsize slider
Replace it with:
$avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423, 'crop' => array('center', 'top')); // images for fullsize pages and fullsize slider
Upload the image again. This time, the crop positioning of the image is center top which prevents the top and center part from being cut off.
Cheers!
IsmaelMarch 15, 2015 at 1:13 pm #411668Thanks, Ismael. I will give this a try.
I notice there is a theme functions.php file in my child theme when I view it using Appearance > Editor. Can I add the above code in here and will that work?
The thing is I don’t want to lose the code when the next theme update happens.
March 16, 2015 at 8:05 am #411916 -
AuthorPosts
- You must be logged in to reply to this topic.