5450 Posts in 1672 Topics by 1197 members
|Go to End|
15 November 2013 at 4:21am
I've tried various techniques for responsive images but they all seem to focus on the template side (which is all well and good when you know what images will be on the page by design) and not the user-facing side, i.e. TinyMCE.
I'm trying to achieve these things:
- Stop SS from re-sampling my images, at all, without me asking it to.
- Stop TinyMCE from adding specific widths and heights to my images.
- Specify my images using custom markup, (so that I can use javasript like picturefill.js to lazy-load the correct image for the device).
I have no idea how to do any of this. Can anyone help please?
In the long-run I really think there needs to be some decent responsive images support built-in to Silverstripe, it's becoming more and more a part of what I do and I think in this day and age it's pretty essential.
7 December 2013 at 3:44pm
There are a couple of people working on this. The big problem is how TinyMCE is hacked to support the images. Take a look at the saveInto function in the HTMLEditorField, it's where the image resize function is called. You should also be able to oveload the tag there. I've been toying with the idea of overloading or subclassing it deal with the issue
|Go to Top|