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

(image: ) tag: width: auto #6602

Merged

Conversation

distantnative
Copy link
Member

@distantnative distantnative commented Aug 11, 2024

Description

Summary of changes

  • Image KirbyTag: support auto as value for width and height attributes, which will use the actual image dimensions for local files

Reasoning

Based on the outline #5064 (comment)

  • I went for auto instead of intrinsic as it felt more common in the Kirby language to me
  • I only implemented the optional, additive enhancement as there has been no consensus in the issue if we would want to migrate to make this the default behavior. I think it's a good enhancement as option nevertheless.

Changelog

Fixes

Docs

(image: cat.jpg width: auto height: auto)
// config.php
'kirbytext' => [
    'image' => [
        'width' => 'auto',
        'height' => 'auto',
    ]
]

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add lab and/or sandbox examples (wherever helpful)
  • Add changes & docs to release notes draft in Notion

@distantnative distantnative force-pushed the enhancement/5064-image-tag-width-intrinsic branch from 96e8a86 to 403d7a4 Compare August 11, 2024 14:48
@distantnative distantnative marked this pull request as ready for review August 11, 2024 14:51
@distantnative distantnative requested a review from a team August 11, 2024 14:51
Copy link
Member

@bastianallgeier bastianallgeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bastianallgeier bastianallgeier merged commit b1b7031 into develop-minor Aug 12, 2024
12 checks passed
@bastianallgeier bastianallgeier deleted the enhancement/5064-image-tag-width-intrinsic branch August 12, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Missing width/height attribute for images when added via (image: ) / kirbytext
2 participants