Skip to content
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

feat: look up modern formats for images with the same filename #490

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

razonyang
Copy link
Owner

Close #470, it works only on the images placed on static folder.

@razonyang razonyang merged commit 90ad95c into master Mar 27, 2022
@razonyang razonyang deleted the feat-image-alternative-formats branch March 27, 2022 18:53
@netlify
Copy link

netlify bot commented Mar 27, 2022

Deploy Preview for hugo-theme-bootstrap ready!

Name Link
🔨 Latest commit e6e5d6e
🔍 Latest deploy log https://app.netlify.com/sites/hugo-theme-bootstrap/deploys/6240b20b23c52800092044c8
😎 Deploy Preview https://deploy-preview-490--hugo-theme-bootstrap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@LITUATUI
Copy link
Sponsor Contributor

Thanks!

@LITUATUI
Copy link
Sponsor Contributor

LITUATUI commented Mar 27, 2022

Just a heads up for the people that want to batch convert their JPG and PNG images to the best image format today, AVIF.

Use ImageMagick to batch convert all JPG and PNG files in your image folder.

In the terminal:

magick mogrify -format avif -depth 10 -define heic:speed=2 *.jpg

magick mogrify -format avif -depth 10 -define heic:speed=2 *.png

This will convert to AVIF in 10-bit.

@LITUATUI
Copy link
Sponsor Contributor

LITUATUI commented Mar 27, 2022

@razonyang this is working great for images inside the posts, but not for featured images in the front matter.

Images in the image viewer (gallery) are also in the original format.

@razonyang
Copy link
Owner Author

@LITUATUI I missed the featured images totally, I'll fix it ASAP. As for the viewer, I don't think it's possible to detect which picture was used by the browser.

@razonyang
Copy link
Owner Author

@LITUATUI Fixed by latest commit.

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

Successfully merging this pull request may close these issues.

Add support for modern image formats (AVIF, JXL and WebP)
2 participants