Profiles

On this page

You can apply the same options to multiple images or 360 spins by creating profiles.

Profiles let you easily apply and update styles on images/spins across your website, without changing any code. When profile settings are updated in your Sirv account, every image/spin referencing that profile will also update.

Apply a profile

To apply a profile, append ?profile=name to the image/spin URL. name should be the file name of the profile you'd like to apply (found in your Profiles folder).

Example:

https://demo.sirv.com/look.jpg?profile=Example-Text

No profile:
With profile:
Image without profile
Image with profile

Create a profile

To create a profile:

  1. Go to your Profiles folder and click "New profile":
  2. Screenshot: create a new profile

  3. Enter a name for your profile:
  4. Screenshot: choose a profile name
  5. Choose the settings you wish to apply, such as a text overlay:
  6. Choose your Sirv profile settings
  7. Click Save.

In the example above, the new profile was named Example. You would apply it to an image like so:

https://example-account.sirv.com/my-image.jpg?profile=Example

Profile code

Profiles are text files, written in JSON.

As they're just text files, with a predictable format, you can even create your own profiles in your application.

This example shows the content of a typical profile. This will apply a text layer to your images and spins:

{
  "image": {
    "scale": {
      "width": 1280
    },
    "frame": {
      "style": "none"
    },
    "text": {
      "text": "Text overlay",
      "style": "simple",
      "font": {
        "family": "Open Sans"
      },
      "position": "southeast",
      "color": "cyan",
      "opacity": 50,
      "background": {
        "color": "red",
        "opacity": 10
      },
      "size": 34
    }
  },
  "spin": {
    "width": 400,
    "zoom": 2.5
  }
}

Order of processing

If the same option is applied via multiple sources, the source with the highest precedence is used, in this hierarchy:

  1. URL (highest precedence)
  2. Profile
  3. Default profile (lowest precedence)

For example, if "quality" is only set in the Default profile, that value will apply. If "quality" is also set in a custom profile and in the URL (e.g. q=75), then the URL option will take precedence.

Was this article helpful?

Get help from a Sirv expert