-
Notifications
You must be signed in to change notification settings - Fork 40
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
improve integration with LiipImagineBundle #78
Comments
if i might add a example - {{ /cms/media/foo | imagine_filter('small_filter') }} so if /cms/media/foo contains a jpeg the thumbnail will be named /media/cache/small_filter/media/foo.jpeg |
There is no option to tell the LiipImagineBundle what the extension is from the image object? In the CmfMediaDoctrineLoader the image object is loaded, if it is possible to tell then what the extension should be the |
@havvg do you maybe have an idea here? |
Well, if you configure a |
I see in the ``FilterManager::get` that the format is detected based on the path if it is not found in the config: https://github.com/liip/LiipImagineBundle/blob/master/Imagine/Filter/FilterManager.php#L73 Isn't the content-type set by the LiipImagineBundlle here? And if the format is set to 'png' is that not only the generated cache file? Although the original image can have a different format. |
@havvg the goal is to determine the output format type dynamically.
|
Well, a possible solution could be combining the Assumption: The The On future calls (above has taken place once) the |
The second part should be wrapped by the https://github.com/liip/LiipImagineBundle/blob/v0.16.0/Imagine/Cache/Resolver/CacheResolver.php to avoid retrieving the meta information every time (see https://github.com/liip/LiipImagineBundle/blob/v0.16.0/Resources/doc/cache-resolver/cache.md). |
for the CmfMediaBundle, the call to make up the path from an id would need to end up in https://github.com/symfony-cmf/MediaBundle/blob/master/Doctrine/Phpcr/MediaManager.php#L121 where we would append the extension based on the mime type if there is no explicit extension asked for. |
seems this won't happen for release 1.1 maybe in a couple months, the LiipImagineBundle has a stable 1.0 out and we can revisit the integration |
it would be good to have a way to ensure that the file format is included in the paths generated via LiipImagineBundle.
f.e.
might then result in
however this can cause issues with some web servers and reverse proxies, as they would then set the content type to
text/plain
.so we need some solution which would allow forcing the format for the mimetype into the resulting URL.
see also #77 for how to convert the mimetype to an extension
The text was updated successfully, but these errors were encountered: