getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
13.78k stars 957 forks source link

Add support HEIC for resize_image #2084

Open euskadi31 opened 1 year ago

euskadi31 commented 1 year ago

Bug Report

Add support HEIC for resize_image

Environment

Zola version: 0.16.1

Expected Behavior

Resize image

Current Behavior

Error: Reason: The file extension `."HEIC"` was not recognized as an image format

Step to reproduce

Use image with format is HEIC

Keats commented 1 year ago

That's not a bug? Is there even a Rust library supporting that format?

DrGo commented 1 year ago

https://docs.rs/libheif-rs/0.16.0/libheif_rs/

Keats commented 1 year ago

According to https://caniuse.com/?search=HEIC it's not usable in any browsers. What's the usecase there?

hsn10 commented 1 year ago

https://en.wikipedia.org/wiki/AVIF is better alternative, just its very slow to compress.

Keats commented 1 year ago

There is a PR for AVIF: https://github.com/getzola/zola/pull/1347 but the issue is that it was making Zola harder to build

euskadi31 commented 1 year ago

According to https://caniuse.com/?search=HEIC it's not usable in any browsers. What's the usecase there?

My need is to use HEIC => JPEG or WEBP conversion

euskadi31 commented 1 year ago

I had taken photos via my iPhone and I used these photos to illustrate an article, I had to manually convert each photo, I would have liked it to be supported natively.

Keats commented 1 year ago

Related thread from the image crate: https://github.com/image-rs/image/issues/1375