瀏覽代碼

Document HEIC image support

Matt Westcott 5 月之前
父節點
當前提交
92567f6203
共有 2 個文件被更改,包括 14 次插入1 次删除
  1. 2 1
      docs/advanced_topics/images/image_file_formats.md
  2. 12 0
      docs/topics/images.md

+ 2 - 1
docs/advanced_topics/images/image_file_formats.md

@@ -25,10 +25,11 @@ image formats and let the browser choose the one it prefers. For example:
 </picture>
 ```
 
+(customising_output_formats)=
 ### Customising output formats
 
 By default, all `avif`, `bmp` and `webp` images are converted to the `png` format
-when no image output format is given.
+when no image output format is given, and `heic` images are converted to `jpeg`.
 
 The default conversion mapping can be changed by setting the
 `WAGTAILIMAGES_FORMAT_CONVERSIONS` to a dictionary, which maps the input type

+ 12 - 0
docs/topics/images.md

@@ -566,3 +566,15 @@ If a user navigates directly to the URL of the SVG file embedded scripts may be
 -   setting `Content-Disposition: attachment` will cause the file to be downloaded rather than being immediately rendered in the browser, meaning scripts will not be executed (note: this will not prevent scripts from running if a user downloads and subsequently opens the SVG file in their browser).
 
 The steps required to set headers for specific responses will vary, depending on how your Wagtail application is deployed.
+
+(heic_heif_images)=
+
+## HEIC / HEIF images
+
+`.heic` images are not widely supported on the web, but may be encountered when exporting images from Apple devices. Wagtail does not allow upload of these by default, but this can be enabled by adding "heic" to `WAGTAILIMAGES_EXTENSIONS`:
+
+```python
+WAGTAILIMAGES_EXTENSIONS = ["gif", "jpg", "jpeg", "png", "webp", "heic"]
+```
+
+These images will be automatically converted to JPEG format when rendered (see [](customising_output_formats)).