This seems to be related to the max image width setting (which we have set to 340px), as the behavior goes away when we remove that value. I didn’t expect this setting to impact videos though… Is this a bug, perhaps?
FWIW, I think the max image width shouldn’t apply for video (even if technically the preview is done with an image thumbnail). As is it it makes videos look a little broken due to the cropped preview.
One idea would be to have a separate setting for max video width that applies to videos+thumbnails. Another possibility would be to respect the image max width on the thumbnail, but expand the video object on play. These are only suggestions — I don’t know how complex either of these ideas are to implement.
This has been fixed on the posts (youtube thumbnail), but it still crops horizontally squeezes the thumbnail preview on the composer when the max image width is low:
Once posted, the embedded video itself is fine (ie, image width doesn’t apply to the video) and that part is fixed. But while composing the message, the thumbnail preview gets squeezed. Technically an image, but I don’t think the max_image_width should apply here?
I recently worked on some changes to image sizes in the post stream (and by extension, previews), and I believe this issue is no longer present in tests-passed. I just tested it locally by setting the max_image_width setting to 340 and using a YouTube link in a post, and I cannot reproduce the issue.
So for the stable branch users, the solution is to wait until the next stable release.