Using Cloudinary upload plugin it returns url without extension #6647

This discussion has been migrated from our Github Discussion #6647

seleckis179d ago

I want to use SVG image for background on my website. I use Cloudinary as a provider for media library. After uploading, setting media in content, and using GraphQL query:

  pages {
    bg {

I get full raw url of that file like this:

It is returned as raw file without extension. When opening this url in browser the file is downloaded. But it is not working as a background in css.

So the question is, how to get an image with extension?

Responses to the discussion on Github

RaphaelFreire105d ago

When uploading svg there was also the problem of not uploading the image thumbnail.

derrickmehaffy102d ago


Hi @RaphaelFreire we are currently looking into this internally and once we have an answer we will let you know.

Hello! I just tried myself and everything is working fine on my side.
Here is a video record of my test -

Let me know if I’m missing something

seleckis96d ago


Hi, thanks for testing. Yes, JPEG works, but not SVG

RaphaelFreire95d ago

Hi, @seleckis I add <svg fill="none" xmlns="" viewBox="0 0 130 128"> in my svg and works.

seleckis95d ago


And fetching it with graphql you receive url with extension .svg?

RaphaelFreire95d ago

“url”: “”,

paulajbastos67d ago

I have the same problem as @seleckis!

no .svg extension

File in strapi
Screen Shot 2020-10-01 at 19 23 51

File in Cloudinary
Screen Shot 2020-10-01 at 19 24 09

paulajbastos66d ago

Found the solution!
Need to put <?xml version="1.0" encoding="utf-8"?> before the <svg> tag.

breth8417d ago


bahadryalcn4d ago

Where should we add this line exactly?

strazan21h ago

Where should we add this line exactly?

At the top of the file, above the <svg> tag!