Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Using Umbraco 7.4.2
I am trying to setup Umbraco so that I can drag and drop SVG images into the Media library ... and have them created as images rather than files.
Also, I would like a thumbnail to show when viewing in the Media Library and media pickers.
I have removed "svg" from
I manually created an Image media item and uploaded the SVG file and all seems to work OK ... so what can I do to allow drag & drop?
It is fine if I need to do something via an event, or similar - I just need to know what I'm looking for!
I'm currently also looking for this answer.
I would say the reason why SVG are created as File media types instead of Image media types is because it is vector graphic, so they don't have values for e.g. height and width properties like jpg, gif and png have.
I submitted a pull request, which render preview of SVG in an <img> element. https://github.com/umbraco/Umbraco-CMS/pull/1402
<img>
/Bjarne
@Bjarne - the preview works fine if you first create an Image node and then upload the SVG file to that.
So, it would be nice if the drag-drop process recognised SVG files and created them as Image types.
Yes, because it just render the uploaded file in an <img> element. But umbracoHeight and umbracoWidth properties are empty then.
Not sure if it could cause some other issues, when working with the media type if it could both be raster and vector graphic.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Is Drag and Drop of SVG possible?
Using Umbraco 7.4.2
I am trying to setup Umbraco so that I can drag and drop SVG images into the Media library ... and have them created as images rather than files.
Also, I would like a thumbnail to show when viewing in the Media Library and media pickers.
I have removed "svg" from
I manually created an Image media item and uploaded the SVG file and all seems to work OK ... so what can I do to allow drag & drop?
It is fine if I need to do something via an event, or similar - I just need to know what I'm looking for!
I'm currently also looking for this answer.
I would say the reason why SVG are created as File media types instead of Image media types is because it is vector graphic, so they don't have values for e.g. height and width properties like jpg, gif and png have.
I submitted a pull request, which render preview of SVG in an
<img>
element. https://github.com/umbraco/Umbraco-CMS/pull/1402/Bjarne
@Bjarne - the preview works fine if you first create an Image node and then upload the SVG file to that.
So, it would be nice if the drag-drop process recognised SVG files and created them as Image types.
Yes, because it just render the uploaded file in an
<img>
element. But umbracoHeight and umbracoWidth properties are empty then.Not sure if it could cause some other issues, when working with the media type if it could both be raster and vector graphic.
is working on a reply...