Blog post photo size is not good

Tamás Varga Posted in Component Development 2 years ago

Blogs 6.3 OSSN 6.1

When setting up a photo in a blog, after opening the padlock, even if there is a save, the padlock will remain closed. How do I open the padlock on the blog for the image by default?

Replies
Hungarian Tamás Varga Replied 1 year ago

OSSN 6.6, White theme. Inserting a photo in the blog is incorrect. I upload the image from my computer, but it doesn't appear. Appears from an external source.

Hungarian Tamás Varga Replied 2 years ago

Michael: Perfect work, thank you very much, in the blog the photo is aligned with the mobile phone.

Hungarian Tamás Varga Replied 2 years ago

Thank you very much, I downloaded the ingredients. I'll test soon.

German Michael Zülsdorff Replied 2 years ago

Well,
I try clarifying it again: The little padlock symbol has absolutely NO impact on which way the image will be scaled on your device(s). It's just an internal editor function to switch the automatic aspect ratio calculation on or off while resizing an image.

You may give it a try and update to Textarea Support 6.7 and Blog 6.5
I tried to refine the scaling code a bit.

Hungarian Tamás Varga Replied 2 years ago

I want my mobile phone to automatically align my blog photo to my mobile phone screen.

German Michael Zülsdorff Replied 2 years ago

Yes, padlock closed is the editor's default user interface setting = keep aspect ratio of the original.
It cannot be changed, and I don't see no reason why it should be changed.
Because in 99% of all cases you won't want to disturb the original aspect ratio.

Let's say, you start with uploading a nice portrait photo of 1000px width and 2480px height.
But the overall size appears too large to you.
With padlock closed you can simply decrease just one size (either width or height) and the other one will be calculated automatically.
Okay, so you saved that portrait decreased to 500px width and 1240px height.
Aspect ratio is kept correctly, but you are still not satisfied with the overall size.
So, back in the editor (padlock closed as before) you would decrease width or height to some even smaller value and save again.

That's the normal workflow and I still don't understand your problem?
Why would you want to have an open padlock by default?
A default open padlock means: doing the aspect ratio calculation manually every time - why?

Why would you want to disturb the aspect ratio at all?
Okay, maybe to get a more fat person out of the original portrait. :)
This time you would open the padlock, change the witdth to 500px and the editor allows to change the height to whatever value you want.
And yes, you have to open the padlock again next time if the portrait has become too fat or not fat enough.
But I would consider this a special case and not the normal workflow.

Hungarian Tamás Varga Replied 2 years ago

Image editing in the blog, unlock the padlock works here.
enter image description here

Save after locking the padlock.

enter image description here

German Michael Zülsdorff Replied 2 years ago

Tamás, please make some screenshots showing your workflow. I don't seem to understand that padlock issue.

Hungarian Tamás Varga Replied 2 years ago

A padlock opens, then save and here it automatically locks again.

Indonesian Arsalan Shah Replied 2 years ago

When you click on padlock does it not open? Maybe what you can do is to hard code in css

@media (max-width: 480px) {
    .blog .widget-contents img {
            max-width:300px;
            ..
            ..
    }
}

This isn't issue but seems this is how tincymce works.