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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | retina_support-2025839-3.patch | 3.51 KB | nadavoid |
| #2 | retina_support-2025839-1.patch | 4.18 KB | nadavoid |
| #1 | 2025839-retina-support.patch | 5.01 KB | jnettik |
| cs_adaptive_image-retinasupport_finetuning.patch | 4.75 KB | gaborpeter |
Comments
Comment #0.0
gaborpeter commentedtypo fix
Comment #1
jnettikSo 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:
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.
Comment #1.0
jnettik+ info on setintervaé
Comment #2
nadavoid commentedUpdated the retina support patch to handle the max image.
Comment #3
nadavoid commentedUpdated patch, removes the halfing of the image dimensions, since the passed dimensions are non-retina to begin with.
Comment #4
vuilComment #6
vuil