I noticed many uploaded images are being compressed to a “square” image in mobile view.
May I know if this an expected design or result of a setting?
Thanks a lot!
Mobile view:
PC view of the same image:
The discussion revolves around images appearing squashed into squares on mobile view, while displaying correctly on PC. Xinweu_Tang reports the issue and shares a link to the problematic image. osioke suggests checking device and browser details, while riking notes the inconsistency between views. Canapin identifies the cause as custom CSS rules in the theme’s mobile styling, setting image dimensions to 100px by 100px. Canapin guides Xinweu_Tang to the theme’s CSS section to modify or remove the rule. Xinweu_Tang confirms the issue is resolved after removing the CSS.
Note that it’s the same image both times, just viewed on mobile? It looks like the aspect ratio / height calculation got messed up.
Thanks for replying.
I dont think it’s being compressed, as I uploaded a screenshot directly.
The browser I used on PC is Chrome.
For phone, its Android10.
This is the link for the troubled image that I posted:
Maybe you want to check if you encounter the same issue with the image in the link above?
Yeah, it is the same image, but it appears differently on PC and Mobile.
It’s because of CSS rules from a custom theme/component:
// Theme: 表情大小
// Target: mobile scss
// Last Edited: 2016-02-10 14:39:25 UTC
div.contents.regular > div > p > img{
height:100px;
width:100px;
}
div.d-editor-container > div.d-editor-preview-wrapper > div > p > img{
height:100px;
width:100px;
}
Thank you so much for finding out the root cause! However, I am still confused over where can I find this rule. Do you have any idea how this can be edited or changed?
In your admin pane, go to Customize, Themes. Select the proper theme or component, click on Edit CSS/HTML, then check the CSS Tab, probably in the Mobile top tab. You should find the corresponding CSS code written somewhere and you can either comment or delete it:
(here it is commented)
// Theme: 表情大小
// Target: mobile scss
// Last Edited: 2016-02-10 14:39:25 UTC
/*
div.contents.regular > div > p > img{
height:100px;
width:100px;
}
div.d-editor-container > div.d-editor-preview-wrapper > div > p > img{
height:100px;
width:100px;
}*/
Yes, removing it has solved the issue. Thanks a bunch!