1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/docs/image_formats_support.md
Travis-Turner c51521961f
Docs/edits overhaul (#785)
* Update landing page / README.md

* Update GETTING_STARTED.md

* Update installation.md

* Update getting_the_image_info.md

* update signing_the_url.md

* Update watermark.md

* Update presets.md

* Update object_detection.md

* Update autoquality.md

* Update serving_local_files.md

* Update docs/serving_files_from_s3.md

* Update configuration.md

* Update generating_the_url.md

* Update chained_pipelines.md but chained pipelines section is not finished

* Update serving_files_from_google_cloud_storage.md

* Update new_relic.md

* Update prometheus.md

* Update datadog.md

* Update image_formats_support.md

* Update about_processing_pipeline.md

* Update healthcheck.md

* Update memory_usage_tweaks.md

* Remove GIF/ICO/BMP/HEIF/AVIF support sections from docs/image_formats_support.md

* Minor fixes of the docs

* Update serving_files_from_azure_blob_storage.md

* Fix issue with x and y offset for 're' watermark property

* Fix params description in docs/watermark.md

* Fix Alexander Madyankin GH name

* Special thanks to Travis

* Fix README

Co-authored-by: DarthSim <darthsim@gmail.com>
2022-02-01 15:43:36 +06:00

2.8 KiB

Image formats support

At the moment, imgproxy supports only the most popular image formats:

Format Extension Source Result
PNG png Yes Yes
JPEG jpg Yes Yes
WebP webp Yes Yes
AVIF avif Yes Yes
GIF gif Yes Yes
ICO ico Yes Yes
SVG svg Yes See notes
HEIC heic Yes No
BMP bmp Yes Yes
TIFF tiff Yes Yes
PDF pdf Yes No
MP4 (h264) mp4 See notes Yes
Other video formats See notes No

SVG support

imgproxy supports SVG sources without limitations, but SVG results are not supported when the source image is not SVG.

When the source image is SVG and an SVG result is requested, imgproxy returns the source image without modifications.

imgproxy reads some amount of bytes to check if the source image is SVG. By default it reads a maximum of 32KB, but you can change this:

  • IMGPROXY_MAX_SVG_CHECK_BYTES: the maximum number of bytes imgproxy will read to recognize SVG. If imgproxy can't recognize your SVG, try to increase this number. Default: 32768 (32KB)

Animated images support

Since the processing of animated images is a pretty heavy process, only one frame is processed by default. You can increase the maximum of animation frames to process with the following variable:

  • IMGPROXY_MAX_ANIMATION_FRAMES: the maximum of animated image frames to be processed. Default: 1.

📝Note: imgproxy summarizes all frames resolutions while the checking source image resolution.

Converting animated images to MP4 :id=converting-animated-images-to-mp4

Animated image results can be converted to MP4 by specifying the mp4 extension.

Since MP4 requires use of a <video> tag instead of <img>, automatic conversion to MP4 is not provided.

Video thumbnails :id=video-thumbnails

If you provide a video as a source, imgproxy takes a specific frame to create a thumbnail. To do this, imgproxy downloads only the amount of data required to reach the needed frame.

Since this still requires more data to be downloaded, video thumbnail generation is disabled by default and should be enabled with IMGPROXY_ENABLE_VIDEO_THUMBNAILS config option.

  • IMGPROXY_ENABLE_VIDEO_THUMBNAILS: when true, enables video thumbnail generation. Default: false
  • IMGPROXY_VIDEO_THUMBNAIL_SECOND: the timestamp of the frame (in seconds) that will be used for the thumbnail. Default: 1.