MyBB Community Forums

Full Version: How to cache images in certian directory?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have seperated image for every forum, and loading time is increased because of that.
All my images (icons) for those forums are stored in directory called "forum_icons". 
How can I cache that directory via cloudflare (or any other possible and better way) for like 1 month so my users don't need to wait over and over for images to load?
PS: I am already using cloudflare.
Hi,

you'll have to create a "rule" to let Cloudflare cache all the images in your "forum_icons" folder.

Check their how-to:
https://support.cloudflare.com/hc/en-us/articles/202775670-Customizing-Cloudflare-s-cache
For anyone looking to do the same thing on their own server without CloudFlare, there's a pretty good guide here on doing it through your .htaccess file.
you can use mod_pagespeed it's a webserver level cache with support for memcached resize photos and lots more

nginx with mod_pagespeed : https://github.com/karljohns0n/nginx-more
mod_pagespeed for apache : https://www.modpagespeed.com/