1

I'm using the library phpthumb for resizing image on the fly on a personal project. I give the users the abilities to modify the image they have uploaded and rotate it. I need to purge the phpthumb cache of the specific image. How can i do this?

thanks in advance ;)

Arnaud Ncy
  • 492
  • 2
  • 5
  • 19

1 Answers1

1

ok I finally found it, in order to refresh the cache of an image we can add a hash parameter like this:

<img src="/uploads/phpThumb.php?src=/uploads/photo/myimage.jpg&w=250&ar=x&hash=<?php echo time(); ?>" alt="#"/>
Arnaud Ncy
  • 492
  • 2
  • 5
  • 19