We have moved to GitHub Issues
Created by Sebastiaan Janssen 21 Apr 2014, 10:45:43 Updated by Mads Krohn 11 Aug 2014, 12:23:37
Is duplicated by: U4-4967
Relates to: U4-4967
Relates to: U4-3933
We used to have this option in v6. Currently the width is hard coded within the umbraco.service.js.
The image gets scaled by the height of the RTE editor. So if you have an image that has a larger height than width (portrait). Than you can’t make it wider because the height of the image has its maximum set to the height of the RTE. RTE height set to: 500px and insert an image with site of 400x1000 will be scale to 200x500
It is completely crazy to have this enabled by default. It's fine as an ''option'', but definitely not as a hardcoded default. I do not want the RTE to arbritrarily resize my images to fit within a 500x500 px box!
@Asbjørn.Riis-Knudsen Okay, we get that it's a problem. Please relax.
Workaround were using in 7.1.3 to render image as uploaded/inserted is to modify dialogService.mediaPicker function in umbraco/js/umbraco.services.js
// editor.dom.setAttrib(imgElm, 'style', s);
var src = img.url; // + "?width=" + newSize.width + "&height=" + newSize.height;
I have made a pull reqeust for this: https://github.com/umbraco/Umbraco-CMS/pull/433
PR looks great, thanks a lot.
I wonder however, when we first install Umbraco, should we set the value to zero by default (no scaling) or leave it as is (500px) ?
I would vote for no scaling by default, but my PR kept the 500px for compatibility reasons.
Yup saw that, happy to change it to not scale by default but would like some others' feedback just to make sure that's agreed with.
No scaling per default! Never assume whats best for the user - the user is probably intelligent enough to decide the size of the images him/herself. Accessibility 1 on 1.
I'd prefer scaling by default as long as I can easily undo it.
I would expect no scaling by default, since 500px is such an arbitrary number that probably fits very few designs perfectly and is problematic for any responsive site.
500 was standard in v4-v6, but was easily changable. I would go for 500 as standard, and then make it easily editable like earlier versions. It wasn't broken then. No need to do it differently.
Note: we need to make these changes to the Grid datatype in 7.2.0 as well, this one has it's own RTE copy.
@sebastiaan - Do you know if the grid data type has a fully configurable RTE like the normal RTE or ?
Currently it seems like a pretty even mixed opinion as to whether to ship with scaled or non-scaled images.
@Shandem Never mind, I just noticed it relies on the normal prevalue editor for the rte, yay!
With regards to scaling: It's always been a source of confusion. I'd rather answer "can I make this auto scale" a hundred times then "why the @#$% is it always 500px". So off by default, but that would probably mean a db migration needs to be written yes?
Changing my mind on this. It's a convenience for editors, who do not know or care about image sizes and will just upload any random 2000x1200 picture and then it's scary. Leave it at 500 default, it can always be changed to suit your site layout's needs.
Ok, I'll close this issue then as there's no more required work, we'll leave the 500px in there as default since it's easy to change.
I'm late to the party, sorry.
But wouldn't it be a lot more intuitive if images by default were the same width as the size of the editor ? At least, that's what I/my clients need for 90% of the time.
Also, have you considered not setting width and height attributes on the images? I've never really understood why that is needed. Perhaps there could be an option to disable size attributes so images could just be 100% width of the containing editor, which would make things easier, I think, on responsive designs.
No it would not, the size of the editor is not necessarily equal to the size of the block where the content is going to be presented.
As for your other question: that sound like a new feature request. I believe the problem at the moment is that we rely on the width and height in the RTE for resizing calculations.
Hah, good point :) And I believe you are correct, it will never be an optimal solution when the image size is calculated based on the size of the rte.
Type: Feature (request)
Assignee: Shannon Deminick
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.1.1
Due in version: 7.1.5