• Resolved Chico

    (@blogginglife)


    Hello,

    The WordPress photo gallery gets every other photo space empty on AMP page. (Not showing photo1, photo2, and photo3 sequently. It shows photo1, empty, photo2, empty, and photo3)

    Here is an example of AMP page.

    https://redwinglife.com/amp-carousel-photo-gallery-test/amp/

    I would appreciate if you could help me to resolve this issue.

    Thank you for your help and support in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I don′t know too much on this stuff but…. your code look as this </amp-img><br/><amp-img src… perhaps the issue is related to the <br/>

    Thread Starter Chico

    (@blogginglife)

    Thank you very much for responding back to my question.

    Yes, I also noticed that there is after every image. I did not know why <br> tag were injected. There is no <br> tag in photo gallery on regular WP page.

    For the test, I also used WordPress standard template, Twenty Sixteen, and simply created new gallery. However, it also get same situation (photo, empty, photo, empty, photo) and there is after every image.

    As a test, I simply created new post and just add gallery, then published. I did not do anything.

    Any idea or suggestion?

    I appreciate your help.

    Regards,

    Well… as a try, you can save the whole html to a file and put it in some folder that webserver can serve it, delete the br and try if this is the issue, if it is you can investigate from where come these br and how to solve.

    But… Just to clear the issue: You made a post, insert in it a gallery and this work well in normal pages, then you go to the amp version and got this issue? or you manually made the amp version?

    • This reply was modified 8 years, 1 month ago by lofesa.

    After digging seems that the conversion and print of carrousel elements is the amp plugin from Automattic. Look at this function AMP_HTML_Utils::build_tag call in this file amp-wp/includes/embeds/class-amp-gallery-embed.php, they use PHP_EOL to “glue” the images elements, try to change it to a blank space( ‘ ‘), but 1s try to make the static file and be sure the br is the origin of the issue

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hey @blogginglife

    Thank you so much for using the plugin!

    This is really strange issue, I have added this in our Github list, we will fix this in the future updates.

    You can track this issue at https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/523

    Thanks @lofesa for helping him out!

    Regards,
    Ahmed

    Thread Starter Chico

    (@blogginglife)

    lofesa (@lofesa),

    Thank you for your reply.

    But… Just to clear the issue: You made a post, insert in it a gallery and this work well in normal pages, then you go to the amp version and got this issue?

    Yes. I think you can easily replicate this issue, by simply create a new post and add gallery, then publish. I think the issue is related to the conversion to AMP page by plugin.

    Thread Starter Chico

    (@blogginglife)

    Ahmed,

    Thank you for your message and following up this issue.

    I really appreciate it.

    Regards,

    Chico

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hey Chico @blogginglife

    No problem! I will personally make sure that it gets fixed!

    Regards,
    Ahmed

    Thread Starter Chico

    (@blogginglife)

    Ahmed,

    Thank you so much! I really appreciate your support.

    I am looking forward to the future update.

    Thanks again.

    Chico

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Empty photo issue: WordPress gallery to AMP carousel’ is closed to new replies.