Sign in

Galleries do not allow width and height to be specified causing AMP issue

  • This topic has 9 replies, 2 voices, and was last updated 1 week, 6 days ago by .
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #5404
    mlryan

    I recently created a page with two image galleries – neat feature. But, while you can specify alt text for them, you can’t specify the width and height, neither does the processing behind the scenes examine the images and place width and height tags in the final HTML. I noticed this in the AMP version as the rules are strict and Google rejected the page highlighting this issue. Once I had manually editted the HTML of the page to add the width and height tags for the images, Google accepted the changed page met the rules.

    The (now corrected) page is at:

    https://www.fullonecommerce.com/amp/optimizely-episerver-company-and-product-analysis.html

    Thoughts? Anything I am doing wrong?

    #5504
    Tomasz Dziuda

    Hi,

    I will try to solve it in v.0.38.2: https://github.com/GetPublii/Publii/issues/951

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5552
    Tomasz Dziuda

    Hi,

    FYI – the issue seems to be related to WebP format – for other image formats it is ok 🙂

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5553
    Tomasz Dziuda

    Ok, I have found a reason – if you are using Jimp as a resize engine (or you just use Linux version of the Publii app) then the images won’t have proper width/height attributes in gallery if they are using WebP. Unfortunately due issues with sharp library on linux, Publii currently does not support WebP on Linux 🙁

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5554
    mlryan

    Thanks for investigating, really appreciate it. Although I am using WebP, I am not using Linux. I use standard Windows 10 version of Publii. I crop my images in Paint.NET and save them as WebP format because I find it gives the best filesize/performance ratio.

    The properties of the file saved by Paint.NET appear to be correct. Is it just a more widely spread issue with WebP files in Publii, and not just related to Publii Linux?

    I have attached one of the images in the gallery where I noticed the error. This attached image is from before it was imported into Publii.

    Attachments:
    #5561
    Tomasz Dziuda

    For me your image is working fine – please check if under App Settings you are using “Sharp” as resizing engine for images. If you are using “Jimp” it can explain a reason of your issue.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5566
    mlryan

    It says Sharp.

    Just so you know, it took me 15 minutes to find the App Settings. It is hidden behind a crazy small, almost transparent and un-named icon. You might consider moving it to the left hand menu where everything else is, or at least label it and make it visible.

    #5568
    Tomasz Dziuda

    Which version of Publii are you using? 0.38.1 or older one? Older version can also have issues with WebP.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5569
    mlryan

    I am using 0.38.0

    I don’t think it is an issue with the format of the files, the Publii application itself does not give you the option to specify width and height in a gallery like you can for a single image.

    #5590
    Tomasz Dziuda

    Publii generate image dimensions for images automatically – that’s why we did not add an option in gallery for it.

    Please update to the newest version of Publii and then please try to add your WebP image to the gallery again. Support for WebP has been added in 0.38.0 and earlier webp files were ignored in some cases so it could lead to lack of width/height attributes.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.