1. retina
I wished to have easy retina display support with pixel density 2.
My idea is to create a new image style for the retina screens, with the same name as the original image style with the --rettina suffix in the end.
(ex: news-image ==> news-image--retina)
Thenafter the module will automatically detect if there is a retina variant available, and serves that for retina devices.

2.
The other fix in this patch is optimizing a bit the amount of HTML code generated.
I beleive adding the whole image tag is just a waste of space, so this patch will server only the image style names via the NOSCRIPT tag.

3.
There is a third little thing, a setTimeout delay when resizing browser screens.
When a user resizes the browser screen, this event fires very rapidly. I believe the whole process should start at the end (*approx) of the dragging event.

Let me know your suggestions.

Comments

gaborpeter’s picture

Issue summary: View changes

typo fix

jnettik’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
StatusFileSize
new5.01 KB

So the above patch didn't apply cleanly for me in -dev and I had some issues with it when it'd switch out images. These lines in the JS:

+	          image = image.replace(  /\/styles\/[a-z-_]*\/+/ , '/styles/'+$(element).attr('data-adaptive-image-' + selected_breakpoint + '-img')+'/');
+	          image = image.replace( 'data-adaptive-image-breakpoint="max"' , 'data-adaptive-image-breakpoint="'+selected_breakpoint+'"');

create broken img tags and then insert the broken tag as text to the screen.

I created a new patch based off the work above that works for me.

I think ideally there should be some mechanism to override the pixel density value to allow site builders to target other devices. But I don't think there is a problem targeting retina devices to start with.

jnettik’s picture

Issue summary: View changes

+ info on setintervaé

nadavoid’s picture

Issue summary: View changes
StatusFileSize
new4.18 KB

Updated the retina support patch to handle the max image.

nadavoid’s picture

StatusFileSize
new3.51 KB

Updated patch, removes the halfing of the image dimensions, since the passed dimensions are non-retina to begin with.

vuil’s picture

Status: Needs review » Reviewed & tested by the community

  • vuil committed af0f46b on 7.x-1.x
    Issue #2025839 by nadavoid, gaborpeter, jnettik, vuil: Support retina...
vuil’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.