Video/gifs not loading in Safari

I have a weird problem I’ve noticed for months but recently did a bit more troubleshooting to narrow down where the problem may lie. I have narrowed it down to a server issue rather than browser plugins etc, but would appreciate any pointers or help to fix it.


  • GIFs (which get turned into mp4s by mastodon) hosted on my instance play in Chrome and Firefox, but not in Safari (either desktop or iOS). I have not checked other browsers.
  • The same GIFs do play in Safari if I view the same post from an alt account on another instance (presumably because it’s using the image cached on that server rather than the original one)

I am suspicious that the problem may be related to this SO issue because if I load the image location URL in a browser I get the same error as in that SO issue, but it’s six years old so maybe not. The key here is my images are hosted locally on the VPS and not in an S3 bucket.


  • I’m running version 3.1.4 using the Docker image on a Digital Ocean VPS
  • my nginx conf file is an exact copy of the latest version as of today, with only the domain name and security certificates changed
  • images are stored locally on the VPS
  • I have reloaded nginx since upgrading



(these make no difference to gifs playing but I am getting FF errors so maybe they’re relevant?)

Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”).

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“style-src”).


On all pages:

Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy.

Only when trying to load mp4s:

Unhandled Promise Rejection: NotSupportedError: The operation is not supported.

I’m guessing there’s some config file I need to update somewhere, but I’m really lost as to where to look or what it might be, so any advice gratefully received

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.