GitHub svg media library preview support (#954)

* Append sanitize query to svg download_url

* Add svg ext to media viewable

* Append searchParam manually
This commit is contained in:
Eric Jinks
2018-01-05 05:17:52 +10:00
committed by Caleb
parent b927c8acfb
commit b8c411ce28
2 changed files with 7 additions and 3 deletions

View File

@ -21,8 +21,8 @@ import { Icon } from 'UI';
* Extensions used to determine which files to show when the media library is
* accessed from an image insertion field.
*/
const IMAGE_EXTENSIONS_VIEWABLE = [ 'jpg', 'jpeg', 'webp', 'gif', 'png', 'bmp', 'tiff' ];
const IMAGE_EXTENSIONS = [ ...IMAGE_EXTENSIONS_VIEWABLE, 'svg' ];
const IMAGE_EXTENSIONS_VIEWABLE = [ 'jpg', 'jpeg', 'webp', 'gif', 'png', 'bmp', 'tiff', 'svg' ];
const IMAGE_EXTENSIONS = [ ...IMAGE_EXTENSIONS_VIEWABLE ];
class MediaLibrary extends React.Component {