Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library component sidebar preview messes up aspect ratio of images #1465

Open
bradenmacdonald opened this issue Nov 4, 2024 · 4 comments
Open
Assignees
Labels
bug Report of or fix for something that isn't working as intended

Comments

@bradenmacdonald
Copy link
Contributor

bradenmacdonald commented Nov 4, 2024

When an image is included in a Text component with an explicit width and height, like TinyMCE does by default:

<img src="http://studio.local.openedx.io:8001/library_assets/component_versions/f12c83a3-2aab-4599-a145-eab778cc62a4/static/XBlock%20Distribution.png" alt="Example" width="1294" height="837" />

Then when it appears in the preview, it will have the specified height but the wrong width, resulting in a distorted aspect ratio:

Screenshot 2024-11-06 at 12 01 40 PM

@bradenmacdonald bradenmacdonald added the bug Report of or fix for something that isn't working as intended label Nov 4, 2024
@bradenmacdonald bradenmacdonald moved this to In grooming in Libraries Overhaul Nov 4, 2024
@rpenido
Copy link
Contributor

rpenido commented Nov 5, 2024

I failed to reproduce this using the Text component.
image

@bradenmacdonald
Copy link
Contributor Author

@kdmccormick @rpenido I figured out how this happens and updated the description.

@navinkarkera
Copy link
Contributor

@jmakowski1123 @lizc577 @sdaitzman @marcotuts This is ready for AC testing on the sandbox

@ChrisChV
Copy link
Contributor

@jmakowski1123 @lizc577 @sdaitzman @marcotuts Friendly reminder that this is ready for AC testing on the sandbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Projects
Status: Ready for AC testing
Development

No branches or pull requests

4 participants