Image formats

SVG: what it is and how Fileboy handles it

SVG describes a picture as shapes, so it stays sharp at any size and is often tiny. It suits logos and icons, not photographs.

SVG

  • Files.svg
  • Fileboy reads itNo
  • Fileboy writes itNo

What it is

SVG is a text format. A logo as SVG can be a few hundred bytes and look perfect on any screen, and it can be styled and animated with CSS.

Because it is code, a browser can run scripts inside an SVG that is opened as a page. That makes uploaded SVGs worth treating with care.

Browser support

Every current browser shows SVG, in an img tag, as a CSS background or inline in the page.

Serve it with Fileboy

Media typeimage/svg+xml
Read by the image pipelineNo
Written by the image pipelineNo

Fileboy stores and serves SVG files as they are, and transforms don't change them. An SVG used in an img tag or as a CSS background works as normal.

When one is opened directly in a browser, Fileboy sends a Content-Security-Policy that stops scripts running in it, and X-Content-Type-Options: nosniff.

Common questions

Will an SVG with a script in it run?

Not from a Fileboy URL opened directly: the policy Fileboy sends blocks scripts and form submissions. An SVG shown through an img tag never runs scripts in any browser.

Other formats

Add Fileboy to your next project

We built Fileboy to stop rebuilding file handling for every app. Create an app, paste your key and upload a file. The free plan needs no card.