Support » Plugin: AMP for WP - Accelerated Mobile Pages » Change image of posts on homepage

  • Resolved dtszero



    I have some problems with the size of the images that displayed on my homepage. I tried to change the sizes editing the php loop files in ftp from ‘full’ to ‘thumbnails’ and ‘medium’ but the changes doesn’t apply.

    What file I need to change for reduce the displayed size of the thumb?

    Because on the related posts block at the end of each post the size is ‘thumbnail’ and I want to show a ‘medium’ size on my homepage.

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ahmed Kaludi


    Hi @dtszero

    We are already using the small thumbnails, but I think your images are very small and it’s not being generated by WordPress.

    Try to upload a larger sized image, I am sure it’ll crop into the smaller one.

    Hi @ahmedkaludi

    Thanks for your reply.

    I’m uploading a 600×300 image in each post, and I generate a 270×180 thumbnail for the amp homepage.

    I’m was viewing the code of the index.php of the template 3, and I want to change the thumbnail size when you use this function ‘ampforwp_get_post_thumbnail’

    I alredy tried with ‘get_the_post_thumbnail($post->ID, array(270,180) );’ and get_the_post_thumbnail($post->ID, ‘post-thumbnail’ );

    But either work. How can I change the return feature image size?


    Or adding the size to the end of the img source works?

    I “resolved it” adding the size manually:

    $thumb_url_ext = substr($thumb_url, -4);
    $thumb_url = (substr($thumb_url, 0, -4) . "-270x180");
    $thumb_url = $thumb_url . $thumb_url_ext;

    But maybe the best way it’s to add a “thumbnail” default size on the panel. Because for PageSpeed 600×300 is too much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change image of posts on homepage’ is closed to new replies.