Support » Plugin: AMP for WP - Accelerated Mobile Pages » Images in AMP not loading properly

  • Hi,

    recently we’ve updated a website for our customer and we ran into one problem that appeared to have happened after updating to the new WordPress & other plugins including AMP for WP.

    There appears to be a problem with a specific section that contain images. One of these pages is: https://www.wereldreis.net/landeninfo/europa/estland/?amp at the section title: “De beste aanbieders van een vakantie in Estland”. Underneath this section there’s blocks that contain images, yet on AMP for WP these images won’t load. Inside the “i-amphtml-sizer” the image tag only contains an empty svg. And theres no other img tag that does actually contain the image. Yet the “amp-img” container does contain the correct link to the image.

    I thought maybe due to WordPress 5.5 the integrated lazy load might have been the problem but after disabling this the problem doesn’t seem to be solved.

    Do you guys have any idea where the issue could be? I’ve checked the error log if there is any errors / warnings related to this, which is not the case. Neither is there any other plugin that uses lazy load in the website currently.

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

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

    (@ahmedkaludi)

    Can you please tell me how you are adding those images on your Non-amp page?

    Thread Starter cherrycommunicatie

    (@cherrycommunicatie)

    Hi Ahmed,

    These images are loaded with an ACF field, see underneath the code that’s used:

    echo '<img src="' . get_sub_field( 'acf_affiliate_img' )['sizes']['medium_large'] . '" />';
    
    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    1. Can you please tell me are you adding the images via the Gutenberg or Classic editor?

    2. Can you please send us the content that is been added? We will see how you are adding the image and try to recreate, that will help us understand and solve it for you.

    Thread Starter cherrycommunicatie

    (@cherrycommunicatie)

    Hi Ahmed,

    We are using neither Gutenberg or Classic editor for the images.

    The content is loaded through a shortcode that’s connected to a custom post type post that loads data through ACF (Advanced custom fields).

    The image is loaded in the PHP function in the way it’s shown in the comment before.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please share a video of explaining the setup? So we can understand properly which will help us to help you.

    Thread Starter cherrycommunicatie

    (@cherrycommunicatie)

    Hi Ahmed,

    Sorry for getting back to you a little delayed. Here’s a video of how the images are being selected an loaded in, and what’s happening: https://www.youtube.com/watch?v=3DXYGliEeK0&feature=youtu.be&ab_channel=CherryCommunicatie

    Hopefully it’s all clear enough.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Images in AMP not loading properly’ is closed to new replies.