-
Notifications
You must be signed in to change notification settings - Fork 379
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
Question: is there possibility to retrieve source image without processing it? #1152
Comments
It will always cache a new copy of the file (using the original file as its source), but it will not apply any transformations or post-processors to the file, assuming you have defined an empty filter-set and post-processor configuration entry. In this situation, while it is a new file, the only operations that are performed with an empty filter-set/post-processor configuration are:
Nothing else is performed. Have you checked your full configuration by dumping the bundle's config using the Symfony console to ensure there are no other options that could be effecting output? The architecture of this bundle currently requires an intermediate cache file, so I do not believe you can completely remove this functionality, as you requested to do in your question. If the cache file is substantially different from the original input file, there must be something occuring within the external imagine-library; as far as I understand, this bundle does not introduce any changes in this situation. I would look into how that external library behaves and any options it may apply itself. |
As I understand it. Steps 2 and 3 always manipulate the original file data through Imagine (open, save), because Imagine always opens the resource (using gd, imagick or gmagick) and saves it to desired path (which always changes the file data). Would it be possible to add filter parameter to LiipImagineBundle (for example passthrough: true) that would skip the steps 2 and 3. and instead just copy the original file to cache? |
@robfrawley thanks for your comprehensive answer. So there might be some defaults which are used by imagine library and which are causing degradation (or manipulation) of the output. What would you suggest if I'd like in certain cases (let's say for filter_set named "original") skip opening source by configured driver. I do not know architecture of the bundle that's why I'm asking - would be possible to eg: change configured driver to custom "dummy" one dynamically? The point is to use cache for these "original" files the same way as it is done for all other filter_sets. |
I am also experiencing related issues by filtering gif images. The output cache resolved image increases the original size even without performing any filter or post-processor operations. Because we have images with different mime types, we wanted to apply certain filter_sets to the images skipping the gif ones. We tried with empty filter_sets and runtime options, also with quality of 100, but something occurs while saving the new image binary that increases significantly the size. Is there any workaround to achieve this? |
i am cleaning up old issues. if this is still relevant and keeps happening with the latest version of the bundle, please reopen the issue. |
@dbu I do not have access to reopen, but Im still interesting in solution if anybody will take a shot on this one. |
i reopened the issue. can you propose a solution @jkabat how this should be handled? |
I tried to search for answer but failed to find one.
Sometimes you need to grab source image without touching it and if I use |imagine_filter in twig, I always end up by getting processed file, even if you do not set any filter at all.
Is there some option I'm missing (quality = 100%, or similar)? Or the only way is to create custom filter which will basically copy the source to target?
The text was updated successfully, but these errors were encountered: