Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 Here

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

    #407918

    Hi 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,
    Rikard

    #408831

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

    #408837

    For example, have a look at the homepage here:
    http://www.unitalianaadubai.com/index-uiad.php

    and 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?

    #409661

    Hi!

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

    #409847

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

    #410322

    Hey!

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

    #411668

    Thanks, 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.

    #411916

    Hi!

    Please try to add it to the bottom of your child themes functions.php to see if it works. Please get back to us if you should have any trouble.

    Regards,
    Rikard

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.