pequeno Posted November 1, 2017 Posted November 1, 2017 Hello, when a user post remote images, don´t limit the dimensions of this images. I have in ACP but external images, shows more bigger than this dimensions. Is there any way to limit the dimensions of external images in posts? Many thanks.
Optic14 Posted November 1, 2017 Posted November 1, 2017 @pequeno I've been trying to reproduce this issue here on the IPS forums as one member posted an external image on my forum where the height was unrestricted. e.g. this 1690x1018 image:https://s.hswstatic.com/gif/water-life-crop.jpg It seems to cap at 450px in height. Can't seem to reproduce it here..
pequeno Posted November 1, 2017 Author Posted November 1, 2017 Thank you @Optic14 I tested with this image in my forum and works fine. But an user upload external images in a post and didn´t limit the dimensions. In Image properties I can view this, but this size is not the image size in the post, and If I modify here the dimensions , then the image adjust to the image properties dimensions. I don´t understand....
Numbered Posted November 1, 2017 Posted November 1, 2017 It may be issue with some css rules or something plugins (and/or editor plugins). Can you share link to your forum for check it? You can check it by yourself with see network tab in console and see ajax answer from forum (what it return in image code). If it return right width/height values - so you got some redefine this value from something. See css applied styles to editor and post. If that checking is not easy for you - try to enable default style to your admin group, switch to default theme is check it again. If issue not reproduce - you know what is source of problem ) If not - try to temporary disable 3rd party apps/plugins (editor too) and check again. Remote images in default forums worked well. I didn't got any problems with that. Some other case for that - way to paste remote images. IPS text parser worked as black-list of tags and that attributes. So if somebody paste image to the editor with copy element from some other website, where it created as div tag with background image and browser copied it with that visual - then text parser may miss it from redefine dimensions.
pequeno Posted November 1, 2017 Author Posted November 1, 2017 4 hours ago, Upgradeovec said: It may be issue with some css rules or something plugins (and/or editor plugins). Can you share link to your forum for check it? You can check it by yourself with see network tab in console and see ajax answer from forum (what it return in image code). If it return right width/height values - so you got some redefine this value from something. See css applied styles to editor and post. If that checking is not easy for you - try to enable default style to your admin group, switch to default theme is check it again. If issue not reproduce - you know what is source of problem ) If not - try to temporary disable 3rd party apps/plugins (editor too) and check again. Remote images in default forums worked well. I didn't got any problems with that. Some other case for that - way to paste remote images. IPS text parser worked as black-list of tags and that attributes. So if somebody paste image to the editor with copy element from some other website, where it created as div tag with background image and browser copied it with that visual - then text parser may miss it from redefine dimensions. Many thanks to @Upgradeovec to help me to find and solved the problem: Quote In source code of your topic this images pasted to editor. But this code is not generated by CKEditor. It didn't make <br> tag (it create <p> </p>). And images didn't set height attribute. So i think this topic created by the user and he can edit his content using source HTML code editor. Its seems related with "copy and paste" action of the post user. Innvisionpower support answer me: Quote This is for images in which have been uploaded to the site. It looks like the content there has been copied and pasted into the page, which attempts to copy it as close to the original as possible, and would not be restricted by those settings. Kind Regards, Marc Stridgen The @Upgradeovec solution is a custom css: .ipsType_richText img { max-width: 640px; max-height: 480px; } and works fine! Many thanks to @Upgradeovec
pequeno Posted November 1, 2017 Author Posted November 1, 2017 1 hour ago, pequeno said: The @Upgradeovec solution is a custom css: .ipsType_richText img { max-width: 640px; max-height: 480px; } and works fine! Sorry, but I find a problem related with locale images uploaded to the post This solution, broke the post when resize image to mobile device @Upgradeovec You can view in the test post that you created in my forum
Numbered Posted November 1, 2017 Posted November 1, 2017 Sorry. Didn't think about it @media screen and (min-width: 980px) { .ipsType_richText img { max-width: 640px; max-height: 480px; } }
pequeno Posted November 1, 2017 Author Posted November 1, 2017 1 hour ago, Upgradeovec said: Sorry. Didn't think about it @media screen and (min-width: 980px) { .ipsType_richText img { max-width: 640px; max-height: 480px; } } Thank you, now works fine.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.