So there are thousands of articles who talk about Image or Video optimization for SEO.

They all talk about how to make name your images, enter that amazing #hashtags and tags so content can be searchable, to use exact number of H1, H2, H3 titles and by doing so you will drive millions of visits to your website or app and how you are going to make millions!

Now this all sounds amazing and some if it works and it might help you get there.

What happens to your website or app if it indeed gets to 1 million visits in a day or month, can your infrastructure handle it, and are you prepared for this massive surge in cost?

First thing that will happen in most cases your service will become unresponsive due the limits of machine that your website is hosted on and if you are one of lucky ones to host on cloud server that can scale instantly, your website might survive it but one thing will not and that is your bank account.

Now why are we talking about this?

Size does matter and if you don’t optimize size of your images and videos they will hurt you more than you can imagine.

Few days ago we talked with a client who wants to handle ~10 Terabytes of video content and during the discussion we came to conclusion that expense for such a move would be close to a billion dollar if all numbers are at maximum, and we were thinking no way it's to much.

While discussing and planning we asked to see the sample content and here it was all creativity of the world in its full power 5 min of video in 4.7gb .mov file, and it would take to have 2000 videos in order to hit numbers we are talking about and let's assume some one has 10TB of data to store and stream in raw format.

Yes 4.7GB file. Now we do understand clients and their will to use that content in it’s full quality same thing is happening to all creators who are uploading videos to Youtube or Vimeo they just want to Upload what they exported and we do agree with them since the services they are uploading should solve that problem for them, but when you want to build in house solution you have to think differently, you are forced to optimize!

So let’s talk about costs if you are planning to handle large amount of Image and Video content, or you are thinking there is big chance to have large amount of bandwidth.

  1. Determine how large is your file and files together - by doing so you will have approximate price for the storage that you will pay, and if you look that Amazon and Azure are charging you 40-50$ per terabyte of data you can calculate your expenses. So storing 10TB of data would cost you 400-500$.

  2. How much bandwidth would your service use per user and what will price be based on calculation. If we take that average file has 5gb (this should not be streamable) even if we use it for download if you take in consideration that on average services charge 120$/ Terabyte of bandwidth we come to point that 1 user would cost you 1200$ to watch or download all 10TB of you content.


Now we know this numbers are unreal and nobody will download 10TB but we want to explain difference in the cost if you optimize even on a small scale website.

We come to very terrifying conclusion that serving 1 user this large amount of data makes no sense and cost would go to 500$ for storage and 1200$ for bandwidth or 1700$ in total if he was supposed to watch all video content in full size, and now we need to optimize this.

If we scale this to 1.000.000 views storage will still be 500$ but bandwidth could go to 1.200$ x 1.000.000 = 1.200.000.000 $ even if we take that only 60% of users will download all content we still have 500.000.000$ bill on our plate. I know this number is unreal and in reality it will never happen because we would optimize size of the content.

Now let’s get to main problem, storing this amount of data for one or 1.000.000 users is same, but when it comes to bandwidth this changes dramatically.

Solution would be to optimize video content to smaller size and still keep high quality in order to reduce bandwidth per video and luckily there is solution or Youtube and other streaming companies would be out of work, since some of videos have 5 billion views and you are not streaming 4gb file but around 60-100mb file like Despacito but since there are 5 billion views you get to 300.000-500.000Tb or 30-50 Petabytes of data streamed from Youtube

Solution is to convert video to MP4 or even better WEBM format

Here are samples of 15mb original MOV conversion to mp4 and webm that just shows difference in compression.

MP4 size 450 kb https://media.publit.io/file/mtxZJtvq.mp4

WEBM size 216 kb https://media.publit.io/file/mtxZJtvq.webm

Now our original file size was 4.7gb and mp4 versions based on quality are

360p video is 23mb in size
480p video is 31mb in size
720p video is 52mb in size
1080p video is 140mb in size - 1080p webm video 80mb in size

When we look at the numbers converting video to mp4 reduced size 

Here is brake down on how we reduced size for each quality of video for MP4 format 33x and webm 58x

If we go to our original calculation we come to the point that original 10TB of data would be for 2000 videos that take 280 GB/15$ for mp4 or 180 GB/ 10$ per month to store it and for bandwidth each user could use max of 280gb to stream it at price of 40$ per user to million of users it would cost around 40.000.000 $ which is big change compared to 1.2b $ so technically if this was implemented we would save 1.15 billion $ to a client. In real world case there is no user that would watch 100% of 2000 videos unless you were streaming Dragon Ball Z from beginning :) 

So in order that you don't end up in this crazy numbers you need to think about optimization

We reduced storage space from 10tb to 280gb

We reduced cost per user from 1200$ to 40$

We reduced file size from 4.7gb to 140mb per video (this can go below 100mb)

We imagined that we saved up to 1.1b $ to client :)

We came to conclusion that if you optimize your video or Image content you could save from 33-58x

In reality we have to reduce the size of video or image content in order to serve it to final user, not all users will watch content from beginning to the end and some of users will watch it multiple times but those numbers are unknown at this moment. 

Still want to manage video and images in house?

Here are some ideas how to optimize image and videos before you upload.

Export from your video editor to mp4 format

Export your image to PNG or WEBP format and make sure it’s smaller than original.

Download video converter software or use online solution, but most of them will ignore upload for files larger than 1gb.

Use Publitio API  to upload content and see how easy it is to convert content to optimized version  by using URL based transformation.

And if you want to manage in house you Image and Video conversion you will need FFmpeg and ImageMagick