0

I have a big website that is using too much bandwidth. Because My Webside contains images with High Resolution. Im caching the pages for 6 hours to reduce db usage.

My question here arises.

If i encode the images to base64, and cache that images in my server as base64, can help to reduce my bandwidth usage ?

I'm open to all suggestions coming from you.

Thank you so much.

  • base64 encoding increases length of image - this will increase bandwidth – Iłya Bursov Jun 01 '14 at 02:18
  • @Lashane Really ? What can i do about that images ? –  Jun 01 '14 at 02:19
  • actually - almost nothing, you can try to re-encode them with lower quality, try different settings, formats (jpg/png), check whether caching actually enabled, but if users download different images in high quality - they will use bandwidth according image's size and you cannot change it – Iłya Bursov Jun 01 '14 at 02:23

2 Answers2

0

Per the comments --

No, Base64 encoding will not help your bandwidth usage. In fact, it will likely make it worse.

  • All right, another question ; Storing images in the database can help about bandwidth usage ? –  Jun 01 '14 at 13:41
  • @EmreY The web server accesses the DB, not the client. It won't make an iota of difference and will just make the server work harder. – Ken Sharp Feb 13 '18 at 13:22
0

Seen as base64 won't help, and enabling compression won't help much, you could always use a content delivery network (CDN).

Chances are you can get a better deal using a CDN than your current service provider, but it really does depend on your current deal.

Personally, I use Cloudflare. Along with their protection (which I don't really need) they cache certain types of requests, such as images.

If these images are static you should increase your Expires to years or even decades, but that will only affect returning visitors or caches. Cloudflare should take a significant load off your server. In some circumstances the load (bandwidth) on my server has been reduced by 50% - which is nice.

Bandwidth saved last month

Cloudflare has a free tier which I think you might be interested in.

Test everything thoroughly before using any solution.

Ken Sharp
  • 934
  • 9
  • 22