In a bug report regarding Discourse v1.4.0.beta1, Itzikiap noted that while <img> tags with explicit width attributes display correctly in the preview window, images revert to their natural size after the post is saved. This issue persists in previous versions. cipher1 suggested that the problem might stem from missing quotes around the width value and provided corrected examples. However, testing revealed that while adding quotes works for new posts, it fails to update the baked version of existing posts. Ultimately, codinghorror clarified that arbitrarily setting image sizes via HTML tags is not supported in Discourse; users must resize images using an image editor to achieve a fixed width.
When I edit a post, I can write img tags for images, and set the size of the image to fit my post, and not be so big. As you can see in the screen shot, in the preview it works.
(Don’t mind the alignment of the text in the edit, I just temporarly aligned it to the left so it would be more convenient to write the img tags)
If that doesn’t fix it, then it probably has something to do with how Discourse bakes the lightboxes for larger images.
Edit: Testing on try.discourse shows that using the examples I provided when initially posting works as intended, but trying to go from what @Itzikiap is using to one of my examples by editing an existing post does not correct the baked version of the post.