WPThumb icon indicating copy to clipboard operation
WPThumb copied to clipboard

Use relative path when generating cache filename

Open mattheu opened this issue 12 years ago • 5 comments

Just wondering what you think about this @joehoyle

The filename is generated using the Args and the file path.

If you move the site to a new server, the file path will probably be different.

This is an issue for inline images added to the post content if the cache folder is not moved - as the new image will have a different filename.

Not really sure if this is a bug as such, and inline images will always cause problems as they would not cause WPthumb to regenerate the thumbnail anyway so we are always reliant on the cache folder but I just thought I would mention it as it doesn't seem ideal.

mattheu avatar May 14 '12 09:05 mattheu

Hmm good point. We should generate the cache filename from relative paths

joehoyle avatar May 14 '12 09:05 joehoyle

+1

willmot avatar May 14 '12 09:05 willmot

That's what I thought... My concern was with backwards comparability though. Not that it would break, but that you could end up with a lot of duplicate cached images.

On 14 May 2012, at 10:12, Joe [email protected] wrote:

Hmm good point. We should generate the cache filename from relative paths


Reply to this email directly or view it on GitHub: https://github.com/humanmade/WPThumb/issues/18#issuecomment-5685559

mattheu avatar May 14 '12 09:05 mattheu

Yes, this is an issue. Changing any behaviour is problematic. I think we may have to build in some kind of versioning backwards compat for when we make this kind of changes,

On Monday, 14 May 2012 at 10:11, Matthew Haines-Young wrote:

Just wondering what you think about this @joehoyle

The filename is generated using the Args and the file path.

If you move the site to a new server, the file path will probably be different.

This is an issue for inline images added to the post content if the cache folder is not moved - as the new image will have a different filename.

Not really sure if this is a bug as such, and inline images will always cause problems as they would not cause WPthumb to regenerate the thumbnail anyway so we are always reliant on the cache folder but I just thought I would mention it as it doesn't seem ideal.


Reply to this email directly or view it on GitHub: https://github.com/humanmade/WPThumb/issues/18

joehoyle avatar May 14 '12 09:05 joehoyle

I think doing this will rely on #21

willmot avatar May 28 '12 18:05 willmot