• Resolved willsmith7

    (@willsmith7)


    Hi. After updating the plugin the images inside the articles started aligning on the left instead of center, on AMP version. But not every image.
    The main lightbox image above the title aligns on the left, all the images in the “classic editor” WordPress block align on the left (despite they are set with center alignment), while the images added through Gutenberg align properly on the center.
    Please can you help to fix this?

    In the example there’s a page made with WordPress classic editor, with all images aligning on the left instead of center.

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

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

    (@ahmedkaludi)

    We have created a ticket for this bug. We will be fixing this in our future updates.
    Reference: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/4156

    Thread Starter willsmith7

    (@willsmith7)

    Thank you a lot. Meanwhile if I add “display: block” to style.php like you showed at the link below does it fix the issue?

    https://github.com/ahmedkaludi/accelerated-mobile-pages/commit/c4c590fe56422baae389bb146e7b55e3cebc25d9

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Yes. If you add this “display: block” it will be fixed.

    Thread Starter willsmith7

    (@willsmith7)

    Added and images inside the articles are now fixed, but the main lightbox image above the title is still aligned wrongly on the left (only when I look at the AMP version from desktop or mobile landscape mode, since in mobile vertical mode the image takes all the screen width). I don’t know if it was like this before the update. I posted this message because it may be useful to you.

    Thank you very much for helping me.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please share the screenshot of your issue ‘that the main lightbox image above the title is still aligned wrongly on the left’? So we can analyze it and help you fix the issue for you.

    Thread Starter willsmith7

    (@willsmith7)

    Sure, here you go:

    Screenshot: https://i.imgur.com/4ASTnII.jpg

    Post link: https://bit.ly/2UJPSzh

    It should be aligned on the center like in the non-AMP version but it’s on the left even with display: block

    But all the other images are now fixed.

    • This reply was modified 5 years ago by willsmith7.
    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    We checked your issue. Here some CSS is code is missing. Can you please tell me what kind of changes are you done on your code?

    Thread Starter willsmith7

    (@willsmith7)

    I only changed how the date is showed, I put the upated date under the title instead of the published date.
    But I made this change a long time ago and never had that alignment issue. The alignment issue occured only after updating the plugin.
    The only other change I did is adding that display: block; as you suggested in this topic.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please use some custom CSS code on your page? And let me know if the issue is solved or not.
    .single-post .post-featured-img { text-align: center; }

    screenshot: https://monosnap.com/file/sPJBWSKPKtwt5ykM0dLuDT8TLuTv0F

    Thread Starter willsmith7

    (@willsmith7)

    I added that code in the custom CSS box of AMP for WP and it’s fixed now. Thank you very much, you are great.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Glad that it’s working now.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Wrong image alignment after update’ is closed to new replies.