When Full HTML page AMP conversion is enabled in Drupal 7, the theme logo (png) gets converted to an amp-img tag with proper dimensions. Still it does not display, probably because the theme does not have the appropriate theming for an amp-img tag there?
Before you try this out make sure the AMP PHP library is at latest version in your D7 installation.
drush composer-manager update lullabot/amp
Make sure you're at 62fe0d505 or later. You need to update because of https://github.com/Lullabot/amp-library/issues/27 Otherwise your png image will not get its dimensions.
Note that the logo displays in Drupal 8 where we have an svg logo. We don't attempt to convert an svg img tag to an svg amp-img tag because we don't know how to get its dimensions.
Comments
Comment #2
sidharth_k commentedComment #3
rainbowarrayThis is super duper fun. AMP will not size an image in display inline-block or float left containers unless they have a defined width. Unless the image has a fixed width set on it. So... setting a defined width on the container. Feels kludgy but so it goes. This is just an example. People can set their own desired width in their custom subthemes.
Comment #4
rainbowarrayShould be fixed in both D8 and D7 now.
Comment #5
rainbowarray