Fix #1051 Missing preview in page media for SVG images

This commit is contained in:
Flavio Copes
2017-04-05 20:47:48 +02:00
parent 6742417d5b
commit 4f91d5bb6e
3 changed files with 9 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
1. [](#bugfix)
* Fix for regression in h3 style in the Spacer field [#267](https://github.com/getgrav/grav-plugin-admin/issues/267)
* Fix missing preview in page media for SVG images [#1051](https://github.com/getgrav/grav-plugin-admin/issues/1051)
# v1.3.1
## 03/31/2017

View File

@@ -56,7 +56,7 @@ export default class PageMedia extends FilesField {
this.dropzone.files.push(mock);
this.dropzone.options.addedfile.call(this.dropzone, mock);
if (name.match(/\.(jpg|jpeg|png|gif)$/i)) {
if (name.match(/\.(jpg|jpeg|png|gif|svg)$/i)) {
this.dropzone.options.thumbnail.call(this.dropzone, mock, data.url);
}
});

File diff suppressed because one or more lines are too long