-
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
Retina #938
Comments
At the moment, you can just define two separate filter sets for normal and retina displays. You can configure any number of filter definitions to solve any resolution requirements, including those you may encounter with retina displays. liip_imagine:
filter_sets:
# normal thumbnails
thumbnail_normal:
jpeg_quality: 85
png_compression_level: 8
filters:
auto_rotate: ~
strip: ~
thumbnail:
size: [256, 256]
mode: outbound
allow_upscale: true
# retina thumbnails
thumbnail_retina:
jpeg_quality: 85
png_compression_level: 8
filters:
auto_rotate: ~
strip: ~
thumbnail:
size: [512, 512]
mode: outbound
allow_upscale: true {# you need to define your own extension to determine if the display is retina #}
{# the `is_retina_display()` function below is only for the purpose of this example #}
{% if is_retina_display() %}
<img src="{{ imagine_filter('thumbnail_retina', imagePath) }}" />
{% else %}
<img src="{{ imagine_filter('thumbnail_normal', imagePath) }}" />
{% endif %} |
@robfrawley thank. Sorry, but how to generate two images with different name Right now i'm doing it like it is shown in documentation:
Thanks //oh you're edited your answer, nice thanks :) |
Hey,
is it possible to somehow intergrate retina support?
If retina show double size.
Or how to generate 2 images.
first one car.jpg
second one [email protected]
Thanks
The text was updated successfully, but these errors were encountered: