Scripting: Prevents SVG files from being used for cross-site scripting attacks.As such, svg-hush filters SVGs and removes any potential risky features, such as: Because SVG files are XML documents, they can have links or JavaScript features that may pose a security concern. This open-source tool developed by Cloudflare is intended to make SVGs as safe as possible. Sanitized SVGsĬloudflare sanitizes SVG files with svg-hush before serving them. However, as stated above, Image Resizing will ignore all transform parameters, as Cloudflare does not resize SVGs. You can also use Image Resizing to sanitize SVG files stored in your origin. In either case, Cloudflare applies SVG sanitizing to your files. If you use flexible variants, all your parameters will be ignored. For example:Ĭloudflare recommends you use named variants with SVG files. You can, nevertheless, use variants to serve SVGs, using any named variant as a placeholder to allow your image to be delivered. Variants, named or flexible, are intended to transform bitmap (raster) images into whatever size you want to serve them. However, as this is an inherently scalable format External link icon Open external link, Cloudflare does not resize SVGs.Īs such, Cloudflare Images variants cannot be used to resize SVG files. SVG filesĬloudflare Images and Image Resizing can deliver SVG files. Convert the first frame of GIF animations to a still image.Preserve JPEG metadata (metadata of other formats is discarded).Support ICC color profiles in JPEG and PNG images.Save animations as GIF or animated WebP.Resize and generate JPEG and PNG images, and optionally AVIF or WebP.Supported formats and limitations Supported input formats
0 Comments
Leave a Reply. |