Skip to content

[IMP] Add image option to cards, update guidelines#18946

Open
nikibrown wants to merge 1 commit into
17.0from
17.0-add-card-img-nikbr
Open

[IMP] Add image option to cards, update guidelines#18946
nikibrown wants to merge 1 commit into
17.0from
17.0-add-card-img-nikbr

Conversation

@nikibrown

Copy link
Copy Markdown
Contributor

Summary:

Extends the custom Card RST directive to allow for images and alt text based on bootstrap conventions. Added an example in the guidelines and tweaked layout javascript to make card images render correctly.

Task: https://www.odoo.com/odoo/project/3835/tasks/6393116

image
 .. card:: Card with image
                :target: ../documentation
                :large:
                :image: placeholder-card-image.png
                :alt: Placeholder card image

                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor.

This 17.0 PR can be FWP up to master.

@robodoo

robodoo commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Pull request status dashboard

@nikibrown nikibrown requested a review from larm-odoo July 15, 2026 22:38
@C3POdoo C3POdoo requested review from a team July 15, 2026 22:40

@AntoineVDV AntoineVDV left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi, the diff LGTM from a technical perspective and it doesn't cost much to run and maintain, even if we end up not using images in cards.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

6KB for such a simple image is suspiciously heavy; it can most probably be reduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants