I have an app loading a fair amount of images like facebook. Larger png files take a bit longer to show up and download. I’m on the $10 a month plan running an nginx reverse proxy with Node and MySQL.
Would something like s3 be better for image speed or do I just need to upgrade digital ocean and/or optimize things?
Any recommendations would be greatly appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
You need to do optimization of server. You don’t need to upgrade anything on DigitalOcean. You already have SSD storage, which is fastest available.
For static images or images you upload to site manually, compress it. There are many services that can do it for you. I can recommend TinyPNG. I think it’s great service for compressing PNGs and JPGs, in my case, results was great.
Little tinkering on server can help. Setup caching correctly, it can help a lot, as it stores content in clients Browser. How to Implement Browser Caching with Nginx’s header Module on Ubuntu 16.04.
You can think about setting up some CDN solution so you can delivery content to users faster. There are many services that can do that for you, free and paid. Usually I recommend CloudFlare, as it’s probably most popular and wide used service for CDN and much more.
You need to try and see does something of these help you. I hope you’ll make it work better. ;)
as @xMudrii replied, caching with nginx header module and cloudflare should do the trick.
also if your app create multiple version of images for different devices, nginx has recently released Image‑Filter module for that. that might give you some extra benefit.