• hey srcset don’t work for my amp page [ redundant link removed ] but work on my none-amp page [ redundant link removed ].
    When i open my amp page and then my amp-img inside my amp caroussel on my mobil it’s show me my largest images instead of the smallest but when i open my non-amp page and then my amp-img inside my amp caroussel on my mobil it’s show me my smallest images.
    Can you help me ?
    i have put this code inside my page.

    <!DOCTYPE html>
    
      <html amp>
    
      <head>
    
       <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
    
       <title>Hy i am AMP page</title>
    
       <meta charset="utf-8">
    
       <script async src="https://cdn.ampproject.org/v0.js"></script>
    
       <title>Hello, AMPs</title>
    
       <link rel="canonical" href="https://e-betherm.fr">
    
       <meta name="viewport" content="width=device-width">
    
      
    
       
    
       <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
    
      </head>
    
        <body>
    <amp-carousel  autoplay dealy="1500" loop layout="responsive" height="100" width="150" type="slides">
    
                    <amp-img layout="responsive" width="150" height="200" src="https://e-betherm.fr/limpaxed/2021/07/etude-Bbio-V1-5.webp"
                      srcset="https://e-betherm.fr/limpaxed/2021/07/etude-Bbio-V1-5.webp 1000w,
                      https://e-betherm.fr/limpaxed/2021/07/etude-Bbio-V1-5-400.webp 400w"
                      sizes="(min-width: 100px) 75vw, 100vw"></amp-img>
    
                    <amp-img layout="responsive" width="150" height="200" src="https://e-betherm.fr/limpaxed/2021/07/etude-complete-V1-4.webp" 
                      srcset="https://e-betherm.fr/limpaxed/2021/07/etude-complete-V1-4.webp 1000w,
                      https://e-betherm.fr/limpaxed/2021/07/etude-complete-V1-4-400.webp 400w"
                      sizes="(min-width: 100px) 75vw, 100vw"></amp-img>
    
                    <amp-img layout="responsive" width="150" height="200" src="https://e-betherm.fr/limpaxed/2021/07/etude-serenite-V3-4.webp"
                      srcset="https://e-betherm.fr/limpaxed/2021/07/etude-serenite-V3-4.webp 1000w,
                      https://e-betherm.fr/limpaxed/2021/07/etude-serenite-V3-4-400.webp 400w"
                      sizes="(min-width: 100px) 75vw, 100vw"></amp-img>
    
    </amp-carousel>
    
              
    
      
    
        </body>
    
      
    
      </html>
    • This topic was modified 2 years, 8 months ago by tobifjellner (Tor-Bjorn Fjellner).
    • This topic was modified 2 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
    • This topic was modified 2 years, 8 months ago by Jan Dembowski.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What plugin are you using for the AMP functionality?

    Thread Starter mathisnarnar

    (@mathisnarnar)

    hey firstly thanks for helping me.
    my AMP plugin is AMP by AMP Project Contributors the official AMP project

    Thread Starter mathisnarnar

    (@mathisnarnar)

    I have the same issue in another page.
    In this page i want to put srcset for my image, it’s work for none-amp page but not in amp page (it’s exactly the same issue with my amp caroussel), i think it’s the same problem with the amp caroussel.

    My HTML code is :

    <figure class="wp-block-image size-large is-style-default" id="conception-bioclimatique"><img src="https://e-betherm.fr/limpaxed/2021/07/home-garden-2401640_1280-1024x719.webp" srcset="https://e-betherm.fr/limpaxed/2021/07/home-garden-2401640_1280-1024x719.webp 1000w,
                https://e-betherm.fr/limpaxed/2021/07/etude-Bbio-V1-5-400.webp 700w" sizes="(min-width: 600px) 100vw, 100vw" alt="Conception bioclimatique" class="wp-image-1656" title="conception bioclimatique"></figure>
    • This reply was modified 2 years, 8 months ago by mathisnarnar.
    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    In that case, I recommend reporting the issue at https://wordpress.org/support/plugin/amp/ so the plugin’s developers and support community can help you with this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘srcset don’t work on amp caroussel’ is closed to new replies.