Skip to content

[Bug]: avif images cannot be published via posts #2158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GamertechAU opened this issue Apr 12, 2025 · 2 comments
Open

[Bug]: avif images cannot be published via posts #2158

GamertechAU opened this issue Apr 12, 2025 · 2 comments

Comments

@GamertechAU
Copy link

Operating system

Fedora KDE 41

Publii version

0.46.4 (build 17047) rpm

Post editor

None

Bug description

  • You can add an .avif image as the featured image of a post
  • The image will show normally in the editor as well as if you generate a post-only preview
  • The image will not be loaded if you preview the entire site or if published to live and will just be a black box
  • The entire featured image markup for any post using an avif image is removed from the full preview or live
  • Occurs both with image optimisation on or off

Only one single entry in the logs for it, but looks like Publii can't get the dimensions of an avif image and ignores it. Though as stated the post-only preview works fine.

Avif has matching support with webp across browsers and is more efficient/advanced and supports animation.

Google, the creator of the webp image format also doesn't understand how they work and think that webp images are webpages to be indexed which negatively impacts crawling budgets.

Steps to reproduce

  • Add an avif image as the featured image of a post
  • Generate a post-only preview (image loads)
  • Generate a full-site preview (image doesn't load)

Relevant log output

FEATURED POST IMAGES - QUERY: 0.688ms
[WARNING] renderer-context.js: wrong image path - missing dimensions for: /***/input/media/posts/48/Elroy_and_the_Aliens.avif
FEATURED POST IMAGES - STORE: 9.371ms
FEATURED PAGE IMAGES - QUERY: 0.859ms
FEATURED PAGE IMAGES - STORE: 0.835ms
@s3nnet
Copy link

s3nnet commented Apr 12, 2025

Same here, latest Manjaro KDE.

@nealmckee
Copy link

Same problem on MacOS 18.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants