Open Migaroez opened 1 month ago
@Migaroez I looked into this issue. We are calling the endpoint of /umbraco/management/api/v1/imaging/resize/urls
for all picked media items in case that a thumbnail is available. For SVGs, we do not get a media URL back on this endpoint, so it ends up being shown as an icon.
I don't think we can get the actual media URL (the umbracoFile
property) at this point. We simply don't have that data. And since .svg
is not considered an image resource on the backend, the endpoint above will never return anything.
I guess that we should add an exception specifically for SVGs in the backend. We want to treat them as images in the Backoffice client, so for us, it makes no difference that they happen to have an .svg
extension. They render just fine in an <img>
element.
What do you think?
Yeah sounds reasonable, I will have a look at the code to see how feasible it is.
I had a look at this and it seems like the requirements for the endpoint were not fully fleshed out when it was created. I will bring this up on the next team meeting.
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
14.1.0-rc2
Bug summary
Can only see the content of an image in the media item workspace (probably not the right name)
Specifics
Example url of a document with 2 pickers https://localhost:44394/umbraco/section/content/workspace/document/edit/095e57cc-2d9a-4286-b133-abb5ab050e00/invariant/view/content/tab/content![image](https://github.com/umbraco/Umbraco-CMS/assets/6025797/07c3611b-382e-4f6f-91fc-3c2c326b42a1)
Preview https://localhost:44394/umbraco/section/content/workspace/document/edit/095e57cc-2d9a-4286-b133-abb5ab050e00/invariant/view/content/tab/content/modal/umb-modal-imagecroppereditor/allimages/invariant/51a1b9c8-6d7d-45ec-b11a-d9679146131e/![image](https://github.com/umbraco/Umbraco-CMS/assets/6025797/3d00d12a-8f14-4354-9973-d252c7915d45)
Media workspace inside infinite editing https://localhost:44394/umbraco/section/content/workspace/document/edit/095e57cc-2d9a-4286-b133-abb5ab050e00/invariant/view/content/tab/content/modal/umb-modal-imagecroppereditor/allimages/invariant/51a1b9c8-6d7d-45ec-b11a-d9679146131e/modal/umb-modal-workspace/media/edit/9ace92ec-7b3c-4ad3-87f0-ebe4dbf823c8/invariant/view/media![image](https://github.com/umbraco/Umbraco-CMS/assets/6025797/4ea1f581-b45a-4b9a-a1c5-86b19a3612c1)
Media library + edit https://localhost:44394/umbraco/section/media/view/media/collection/grid/modal/umb-modal-workspace/media/edit/5fb246b0-729f-41d2-85c4-c644a323e91c/invariant/view/media![image](https://github.com/umbraco/Umbraco-CMS/assets/6025797/554872a7-022b-4f4f-8cf5-501720920f6f)
Media workspace straight from the tree https://localhost:44394/umbraco/section/media/workspace/media/edit/5fb246b0-729f-41d2-85c4-c644a323e91c/invariant/view/media![image](https://github.com/umbraco/Umbraco-CMS/assets/6025797/9547f7f0-eb47-4134-a8e1-1272c6c6db8e)
Steps to reproduce
Expected result / actual result
All examples specified should render at least a thumbnail of the SVG