Closed (won't fix)
Project:
Responsive images and styles
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2012 at 08:20 UTC
Updated:
9 Oct 2014 at 14:54 UTC
Jump to comment: Most recent
Comments
Comment #1
attiks commentedIf that is your only use case, you are better off using picture module, it is the newer version of this module, and it uses media queries, so it easier to detect high density displays.
You have to install breakpoints and picture (it is safe to use the latest dev versions), create 2 breakpoints (media queries), create a new breakpoint group, define picture mappings and change the display formatter of your image field to picture.
Comment #2
derMatze commentedBut that module only works for image fields not for images that are printed via something like theme_image_style within a tpl...?
Comment #3
attiks commentedIt is not really best practice to do something like that, but you can do something similar with picture.
You can call theme('picture_formatter', ...), but maybe it easier to use drupal_render and create an element like in http://drupalcode.org/project/picture.git/blob/refs/heads/7.x-1.x:/pictu...
You still need to define the breakpoints, breakpoints group and picture mapping.
If you want to use resp_img, you just create a second image style with twice the width/height of the one you have now.
Comment #4
attiks commentedOld issue, I think you better update to the picture module