Cached, PHP generated Thumbnails load slowly

前端 未结 19 2056
醉酒成梦
醉酒成梦 2020-12-12 11:35

Question Part A ▉ (100 bountys, awarded)
Main question was how to make this site, load faster. First we needed to read these waterfalls. Thanks all fo

19条回答
  •  失恋的感觉
    2020-12-12 12:21

    If there isn't a really good reason (usually there isn't) your images shouldn't invoke the PHP interpreter.

    Create a rewrite rule for your web server that servers the image directly if it is found on the file system. If it's not, redirect to your PHP script to generate the image. When you edit the image, change the images filename to force users that have a cached version to fetch the newly edited image.

    If it doesn't work at least you will now it doesn't have anything to do with the way the images are created and checked.

提交回复
热议问题