Support

Home Forums Event Espresso Premium Featured image on Grid view and event are pixelated

Featured image on Grid view and event are pixelated

Posted: April 27, 2016 at 12:44 pm


Ben Willson

April 27, 2016 at 12:44 pm

I am trying to figure out why the image is being pixelated on the gridview page when the size of the picture is 400px x 400px, and the image box is set to 350px x 350px.

here is a link to the page.

http://www.bluecloverevents.com/5k-color-bash/color-runs/

thanks in advance.


Tony

  • Support Staff

April 28, 2016 at 3:41 am

Hi Ben,

The Grid view template pulls in the ‘thumbnail’ size image for your events, by default this is usually 150px by 150px.

If you take a look at the image on your current grid, you’ll notice it is pulling in the thumbnail – http://take.ms/mc5fJ

Then your setting the width and heigh using CSS to 350, so its taking an image from 150×150 to 350×350, which causes it to pixelate.

One way to fix this is to pull in the correct size image for your grid view, you’ll need to modify the grid template to do that.

Grab a copy of /wp-content/plugins/eea-events-grid-view-template/templates/espresso-grid-template.template.php

Place that copy within:

/wp-content/uploads/espresso/templates/

Now within that new file look at line 26, you should have:

$feature_image_url = $post->EE_Event->feature_image_url();

Change that to:

$feature_image_url = $post->EE_Event->feature_image_url( array( 350, 350) );

That should then pull in an image close to your size (or the full image) and prevent the above.

The support post ‘Featured image on Grid view and event are pixelated’ 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