Faster image downloads?
I use a good server, but the images of my web app are slow to load... Without a CDN, how to speed this up? Cache them?
Can you give an example? Are you sure that they are compressed and in a proper format? Ensure that they are never bigger than they need to be.
But you should be able to cache them in nginx like this
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Vary Accept-Encoding;
access_log off;
}
Example borrowed from here: https://stackoverflow.com/a/20843725/1305117
@Sinnbeck Thank you for your perfect answer on how to enable server-based cache for images!
@itinerix How big are the images? How many are you loading on a page? Like, define “slow” 🤷♂️
We need specifics. You can’t just say “images are slow” and expect us to know why or what to do to remedy it.
Please or to participate in this conversation.