Oddbean new post about | logout
 

# Why do my gifs not work on iOS?

I'm trying to add a GIF into my HTML using this code:

```
<img src="https://www.example.com/image.gif" alt="description">
```

It works in Chrome and Firefox, but it doesn't work on iOS devices. In particular I have tried on the iPhone 6s with iOS 8.4.3.

I also tried it on Safari and this is what I got:

Comment: This could be because of your server that hosts the image. Do you have a way to test if the image works fine for other devices?

## Answer (5)

This is a very common issue, try loading the image from a CDN like cdnjs, if it's not working then it's most likely related to your server, if it is working then check if your server is configured correctly for serving gifs.

Comment: That was it. Thanks for pointing me in the right direction.

## Answer (2)

If you are using an iPhone device that has not yet updated to iOS 9, you may need to specify a file size of at least 1MB for your GIFs to work properly on Safari:

```
<img src="https://www.example.com/image.gif" alt="description" width="500px" height="250px">
```