-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update specific image if source has changed? #132
Comments
Your |
Hmm. I cannot get this to work :( The filter configuration:
$oldWebPath is a relative url, namely e.g. 'uploads/avatars/16.jpeg'. In the template, I use I use the current dev-master version of Liip..Bundle, Imagine 0.4.0 with composer and Symfony 2.1 |
I found the solution, we have a little bug/non-expected behaviour here. Not working:
Now uncomment the resolve line, the file gets deleted.
where $pngPath is the path of the original image relative to the webroot, e.g. 'uploads/avatars/16.png' |
sorry .. i do not have time to dig into this atm. would be great if you could look into figuring this out. not sure if we need to add a |
I planned to write tests for most parts of this bundle over this weekend, hopefully I will discover the missing pieces and/or verify existing stuff :) |
wow! that would be sooooo awesome. |
The correct behavior is to work with the $cacheManager = $this->get('liip_imagine.cache.manager');
$cacheManager->resolve($this->getRequest(), $pngPath, $filter);
$cacheManager->remove($pngPath, $filter); |
I'm using Liip to transform profile pictures to different sizes and I store them on the filesystem using the default configuration.
I cannot find a way to delete the old cached image, so it gets re-generated.
The goal is to have a filter name and a webpath of the original image file to delete the cached version(s) of that file.
I don't want to wipe the whole cache just because someone changed his profile picture.
My code so far:
How can I get this solved?
The text was updated successfully, but these errors were encountered: