提交 2a0823ec 编写于 作者: D Dino Maric 提交者: George Claghorn

Support creating variants of `webp` images out of the box

This PR adds `image/webp` to the default array of variable content
types. Without this commit if we want to "handle" webp images
overwriting `config.active_storage.variable_content_types` was
necessary.
上级 1ef8c60d
* Add support for creating variants of `WebP` images out of the box.
*Dino Maric*
* Only enqueue analysis jobs for blobs with non-null analyzer classes.
*Gannon McGibbon*
......
......@@ -38,6 +38,7 @@ class Engine < Rails::Engine # :nodoc:
image/bmp
image/vnd.adobe.photoshop
image/vnd.microsoft.icon
image/webp
)
config.active_storage.content_types_to_serve_as_binary = %w(
......
......@@ -900,7 +900,7 @@ You can find more detailed configuration options in the
config.active_storage.paths[:ffprobe] = '/usr/local/bin/ffprobe'
```
* `config.active_storage.variable_content_types` accepts an array of strings indicating the content types that Active Storage can transform through ImageMagick. The default is `%w(image/png image/gif image/jpg image/jpeg image/pjpeg image/tiff image/bmp image/vnd.adobe.photoshop image/vnd.microsoft.icon)`.
* `config.active_storage.variable_content_types` accepts an array of strings indicating the content types that Active Storage can transform through ImageMagick. The default is `%w(image/png image/gif image/jpg image/jpeg image/pjpeg image/tiff image/bmp image/vnd.adobe.photoshop image/vnd.microsoft.icon image/webp)`.
* `config.active_storage.content_types_to_serve_as_binary` accepts an array of strings indicating the content types that Active Storage will always serve as an attachment, rather than inline. The default is `%w(text/html
text/javascript image/svg+xml application/postscript application/x-shockwave-flash text/xml application/xml application/xhtml+xml application/mathml+xml text/cache-manifest)`.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册