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

Incorrect aspect ratio on large images #353

Open
mwentz opened this issue Jan 17, 2025 · 0 comments
Open

Incorrect aspect ratio on large images #353

mwentz opened this issue Jan 17, 2025 · 0 comments
Labels

Comments

@mwentz
Copy link

mwentz commented Jan 17, 2025

Description

Images larger than 1200px width and/or height have incorrect aspect ratio. When an image has dimensions higher than 1200 the height/width is reset down to 1200 when the item is saved a second time.

Steps to reproduce

  1. Insert a non-square image with dimensions higher than 1200px for height and width using "insert image"
  2. Save the entry
  3. Open the entry again (if you view the source you'll see the aspect ratio as 1200/1200 and height and width set to 1200)
  4. Save entry again
  5. Go to a page displaying the entry and the image is square, stretching the aspect ratio. Inspect the image and it will show style="aspect-ratio:1200/1200;" and the height and width attributes are set to 1200.

Additional info

  • Craft version: Craft Pro 5.5.7
  • PHP version: 8.3.14
  • Database driver & version:
  • Plugins & versions:
    CKEditor | 4.4.0
@mwentz mwentz added the bug label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant