Cloudinary supports the SVG format.
SVG images are automatically converted to a standard image format (e.g., PNG, JPG, etc.) during the upload process,
You should specify the image format via an incoming transformation,
Here's an example in Ruby of uploading an SVG file while converting to a PNG file before storing in the cloud:
Cloudinary::Uploader.upload("Feed-icon.svg", :public_id => "svg_sample", :format => "png")
Below is the SVG image after it was uploaded to Cloudinary:
http://res.cloudinary.com/demo/image/upload/svg_sample.png
Now you can transform it to match your graphic design, for example:
http://res.cloudinary.com/demo/image/upload/w_100,e_hue:40/svg_sample.png
**Update**
You can now transform an SVG image. For example, when asking for a larger image w_3000 will do the enlargement on the SVG first and then convert to PNG/JPG.
Comments
4 comments
This isn't really an acceptable solution (it was maybe a few years ago though).
SVG assets should not be blindly converted on upload. SVG assets should be used as the actual asset whenever possible with png support for browsers that don't support it or mobile apps.
The idea that I can upload an svg then never see that svg format again is wrong.
I wish this comment read "Its great you guys support svg, but how about letting us build a font/icon set from the svgs"
Anyways, time to see if any of your competition supports svg hosting the right way.
We now support uploading SVG files as-is and then manipulating dynamically to any image format and other Cloudinary transformations (e.g., resize and convert to PNG). However, we don't yet fully support applying image manipulations and delivering the result as SVG images (e.g., resizing an uploaded SVG image). Specifying the format (e.g., JPG/PNG/etc) is required in this case (but delivering the original SVG is supported).
It is in our road-map to support delivering manipulated images as SVG images as well.
Now that SVG can be transformed to other formats, can you provide a method to keep the font type?
Currently my SVG images that contain 'Arial Narrow' are being replaced with 'Arial' and messing up the layout for downloaded JPEGs.
Is there a known issue with applying on-the-fly transforms such as crop (c_fill specifically), along with height and width parameters using the fetch method to an SVG image? due to our implementation, we are globally applying c_fill across the board to all images. However, cloudinary seems to blur SVG images that have crop, height and width. Even given your example above of the picture frame and adding c_fill returns a blurred image: http://res.cloudinary.com/demo/image/fetch/f_jpg,w_3000,c_fill/https://upload.wikimedia.org/wikipedia/commons/0/04/Frame.svg
Given the fact that i can't individually control which images receive this c_fill param, is there a better, more ideal way to do this other than just leaving off the crop entirely?
Please sign in to leave a comment.