mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
1ef8c60dfc
commit
2a0823ecba
3 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
* 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 @@ module ActiveStorage
|
|||
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)`.
|
||||
|
|
Loading…
Reference in a new issue