1. dock21
  2. General question
  3. Thursday, 03 June 2021
Hello

Firstly, thank you for this great tool.

I need your help on sething : I optimize my image by callling curl -d 'url=xxx/myimage.png'

=> it works fine

However if I modify myimage.png while keeping the same name, when I call imageRecycle again to optimize, it's the old image that get compressed again, not the new one.

Knowing that I can't change the name, is there a solution to tell ImageRecycle to get the new image ?

Thanks again

Virginie
Responses (3)
Accepted AnswerPending Moderation
Hi there,
You mean you use a dedicated script to optimize your images? And you call the ImageRecycle API through your custom script? Like that:?

curl -X POST
-d 'auth={"key":"your_api_key","secret":"your_api_secret"}'
-d 'url=https://www.google.fr/images/srpr/logo11w.png'
-d 'params={"compression_type":"lossy"}'
'https://api.imagerecycle.com/v1/images'


There is no cache on our side, it will query again your server to get the image.
Do you have any cache, on your side that would return the old version, like cloudflare or any other CDN provider?
You will have in this case to clear your cache before calling again ImageRecyle API, I'm afraid we won't have any option to pass through your cache.

Best regards,

Damien
  1. more than a month ago
  2. General question
  3. # 1
Accepted AnswerPending Moderation
hello damien

yes your assumption is correct, its' exactly what i am doing.

So I found a solution I give in case others have the same issue : I will copy my image, optimize the copy and then delete the copy.

Thanks for helping

Virginie
  1. more than a month ago
  2. General question
  3. # 2
Accepted AnswerPending Moderation
Yes that's the best way to do that, you may need to set a unique name for your copy to avoid a cache of copy if you need it again :)
  1. more than a month ago
  2. General question
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!