Support

Home Forums Event Espresso Premium Divi and EE4 – Featured Image

Divi and EE4 – Featured Image

Posted: July 27, 2017 at 3:44 pm

Viewing 9 reply threads


punderwood75

July 27, 2017 at 3:44 pm

Hi

I am having problems with Featured Image for the event being too large. Read a bunch of posts and added all these to my DIVI Custom CSS

.ee-featured-image img {
max-width: 100%;
}

.single-espresso_events .fusion-flexslider .slides img, .post-type-archive-espresso_events .fusion-flexslider .slides img {width:50%;}

Also

When looking in Chrome Dev tools this was the CSS Tag i think at that point

.et_post_meta_wrapper img {
max-width: 100%;
}

So added that as well.

Any ideas how to resolve? The image is like 300px x 174px but in the HTML its being forxed to 1080 x 675.

Thanks


punderwood75

July 27, 2017 at 3:47 pm

Link to image. https://www.dropbox.com/s/uhvx067urzq6axb/2017-07-27_22-45-27.png?dl=0


Josh

  • Support Staff

July 27, 2017 at 4:20 pm

.et_post_meta_wrapper img {
max-width: 200px;
}

or whatever size you actually want should do it.


punderwood75

July 27, 2017 at 4:54 pm

Hi

I have tried that – various different width sizes, but the top and bottom of the image are always cut off.

https://www.dropbox.com/s/ogmb3059nll67kd/2017-07-27_23-53-37.png?dl=0


Josh

  • Support Staff

July 27, 2017 at 11:34 pm

In this case a screenshot of the issue isn’t what we need to find out which of Divi’s styles need to be overridden. If you can post a link to the page in question we can check the CSS on that page and share a suggested fix.


punderwood75

July 28, 2017 at 1:12 am

ok go here > http://www.silkbowevents.com/?bypass=fight (the site is not live and so you need to bypass the holding page) and then http://www.silkbowevents.com/events/charity-black-tie-boxing-event/

Thanks


Tony

  • Support Staff

July 28, 2017 at 6:08 am

Hi there,

The top and bottom of the image have been cropped, you can’t fix that with CSS, this is the image that is loading on the page:

http://www.silkbowevents.com/wp-content/uploads/2017/06/Charity-Boxing-Flyers-620×675.jpg

Note that the top and bottom has already been cropped, so regardless of what size you set using CSS it will always look like that.

Looking through the code for Divi I can’t anywhere that will allow you to set a full fix image to load without completely overriding the template for EE (which is a bit excessive just for the thumbnail).

Can you check with Divi support to see how you can force Divi to load the full size feature image, not the cropped et-pb-post-main-image-fullwidth version it is loading now?


punderwood75

July 28, 2017 at 2:38 pm

I am really confused, or maybe dumb πŸ™‚

I only have 1 image in my media library, it’s the same image thats on the home page and its not cropped.

In EE – Events section i have added that image and it shows fullsize. I have NO idea why its loading a cropped image. Nothing is set to be cropped. So why is EE using a cropped image ?

Screenhots to prove it πŸ™‚

https://www.dropbox.com/sh/zl3rdo4nwz8ryy8/AAAnKFnHhlX5yir0-2BygYHka?dl=0

Paul


Tony

  • Support Staff

July 28, 2017 at 3:24 pm

Hi Paul,

That screenshot doesn’t actually prove anything πŸ™‚ Yes you only have a single image in the library, but you will have multiple copies of that image on your server, all at different sizes.

When you upload an image to WordPress it creates multiples of that image, one for each size that has been added to your site, Divi adds multiple sizes so if you look within the /wp-content/uploads/ directory of your site and find your original image you’ll actually see something like this – http://take.ms/bHGZk

All I have done there is install Divi locally, save the original image from your site (the full size one) and upload it to my site, WordPress (and Divi) does the rest.

In EE – Events section i have added that image and it shows full size. I have NO idea why its loading a cropped image. Nothing is set to be cropped. So why is EE using a cropped image ?

The sites theme has complete control of the featured image, not EE, so it’s not EE loading that image, its Divi.

You’re correctly selecting the full image, but Divi (not EE) is loading one of its own sizes when the image is output to the page. I know this because when I uploaded the image above and tested this locally, I get the exact same problem with Divi and I traced back the code within the theme to find out whats going on.

There is a solution to we can give you, but it involves either completely overriding the Divi template for EE events and forcing it to output a specific size image (the full-size image), or completely overriding the function that Divi is using to determine which image size it should output.

(Again note both of the above fixes are overriding what Divi is doing, not EE)

That’s rather extensive just to fix an issue with the image so it’s best to confirm with Divi support that it doesn’t have the option to load only the full-size image for the featured image that I’m missing.


Tony

  • Support Staff

July 28, 2017 at 3:28 pm

And…. right after posting I think of a solution that may work for you.

If you create a custom functions plugin on your site:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

And then add this function to that plugin:

https://gist.github.com/Pebblo/9bfbc3995dcd298be224b0d1285f061c

It forces the size of the image Divi is using to match their ‘full size’ image and should load the full image on EE events.

Viewing 9 reply threads

The support post ‘Divi and EE4 – Featured Image’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso