Edit Event Featured Image Size

Home Forums Calendar Products Events Calendar PRO Edit Event Featured Image Size

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1331327
    Linda
    Participant

    Event featured images are full size. I’d like to set them to be 1120×500 cropped from the top down so that the bottom part of the image is cropped off. I’ve tried to edit the function.php and had no luck

    I tried replacing this:

    // Add Image Sizes.
    add_image_size( ‘featured-image’, 720, 400, TRUE );

    with this:

    // Add Image Sizes.
    add_image_size( ‘featured-image’, 1120, 500, array( ‘center’, ‘top’ ) ); // Hard crop center top

    Nothing I do seems to have an impact on the featured image size. It shows full size.

    Here is a test event with a featured image.

    https://www.got2lindy.com/event/test-000/

    #1331391
    Linda
    Participant

    I just changed my mind obout this. I think the only thing I want to do is change the event featured image dimensions to 1120×500 and have the image cropped from top and bottom which is the way I think it’s normally done. The image is centered vertically and then cropped from top and bottom, correct?

    Question: What dictates the size of the thumbnail shown in a facebook link when the featured image is pulled when pasting a link?

    For instance, with this image, you can see that the featured image is cropped. Obviously the crop is not ideal.

    https://www.dropbox.com/s/kuucv3idt67id94/Screenshot%202017-08-06%2011.40.25.png?dl=0

    Where as, the crop in this featured image when I post is look good. Looks like the image is scaled down perfectly.

    https://www.dropbox.com/s/gk7vrd92j5k0y47/Screenshot%202017-08-06%2011.41.38.png?dl=0

    #1331926
    Geoff B.
    Member

    Good evening and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    If I understand correctly, you are mostly interested in the appearance of the featured image in the context of sharing it on Facebook. Can you confirm ?

    Since it looks like you are using Yoast SEO, the easiest way to get precisely the image you are after would be to use its built-in FB thumbnail functionality.

    This way each image can be cropped to your liking while not upsetting the event’s Featured Image (unless you want to do that as well).

    As for your other question, the featured image from Events is controlled by the exact same process as Featured images in WordPress.

    I would recommend reading the following:

    1. https://themezee.com/docs/change-size-of-featured-images/
    2. https://slocumthemes.com/2014/05/adjust-set-size-featured-image-size-wordpress/

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1333888
    Linda
    Participant

    Yeah, thanks I had figured out the Yoast bypass just after I posted here. The remaining question I have still remains unanswered.

    How can I change the featured images size shown for events to 1120×500? Currently the featured image dimensions do not appear to be respecting the stock featured image size in my functions.php file.

    // Add Image Sizes.
    add_image_size( 'featured-image', 720, 400, TRUE );

    The plugin you mentioned hasn’t been updated in 2 years. Also, I don’t see the need. I could easily change the dimensions of the featured image in the functions.php, but this size is not being respected by the events featured images.

    #1336271
    Barry
    Member

    Sorry for the delay there, Linda.

    By default, in single event posts, we use the ‘full’ size (not ‘featured-image’). Would you be down to make that change? Alternatively, you can alter the size we default to with code along the following lines:

    add_filter( 'tribe_event_featured_image_size', function() {
        return 'featured-image';
    } );

    The above code could also be added to your theme’s functions.php file if that’s where you mostly keep this sort of customization 🙂

    I hope that helps!

    #1346047
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Edit Event Featured Image Size’ is closed to new replies.