attachment_image
The picture on a project task's kanban card is not a binary field. It is attachment_image: a tiny display-only widget that turns a many2one to ir.attachment into a 300x300 image.
August 25, 2026Updated August 25, 20265 min read
| Technical name | attachment_image |
|---|---|
| Field types | many2one |
| Views | kanban (core usage); renders wherever the field is placed |
| Module | web, present in every Odoo database |
| Used in core | 3 occurrences across 2 modules, including project, project_todo |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. Applied in view XML; Project's Set Cover Image menu manages the underlying field |
| Alternatives | image, image_url, background_image |
What the Attachment Image field does
What this means for your team
Working examples
The /web/image route does the real work
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Development branch shows internal changes only; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source; many2one value access updated internally. |
| Odoo 18.0 | Verified | Same behavior: 300x300 resize, debug-only tooltip. |
| Odoo 17.0 | Verified | 300x300 server resize and debug-only tooltip introduced here. |
| Odoo 16.0 | Verified | Renders the attachment at full size and always shows the file-name tooltip. |
Upgrade note. Nothing to migrate between 16 and 19: the widget name and the XML are identical. Cards may look lighter after a 16 to 17 upgrade because the server starts serving 300x300 thumbnails instead of full-size files, which is a bandwidth win, not a regression.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Nothing renders at all | The many2one is empty; the widget's template only emits an img when the field has a value. Set a cover attachment on the record, or guard the element with t-if like core does. |
| Broken image icon | The many2one does not point at ir.attachment, or points at a non-image attachment. Restrict the field to image attachments of the record, mirroring displayed_image_id's domain. |
| Image looks small or blurry | The server scales the attachment to fit 300x300 and never upscales; tiny sources stay tiny. Attach a larger image; for other sizes, use the image widget on a binary field instead. |
| No file name on hover | The tooltip is rendered only when developer mode is active. Enable developer mode, or accept it: users are not meant to see attachment names here. |
| Options in the view have no effect | The widget declares no supported options; the options dict is ignored. Use the image widget for size, zoom or preview options. |
Attachment Image field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
attachment_image | Showing one of the record's attachments as a picture, the kanban cover image pattern | Reads a many2one to ir.attachment; display only, fixed 300x300 server resize |
| image | A picture stored on the record itself, with upload, zoom and size options | Works on binary fields and is fully editable; attachment_image only displays a reference |
| image_url | Displaying an image hosted at a URL stored in a char field | Takes the address from field text instead of an attachment id |
| background_image | A binary image as a decorative background | Same lazy img rendering as image but without any editing chrome |
Frequently asked questions
How do I set the cover image on a project task?+
Why must the picture be attached to the record first?+
Can I change the 300x300 size?+
Does attachment_image work in form views?+
Why do I see a placeholder instead of the image for some users?+
Want kanban boards your team can scan in seconds?
Cover images, badges and card layout are small view changes that transform daily boards, and they need someone at home in Odoo's kanban XML. We build exactly this kind of board polish, custom cover fields included, in our Odoo customization work on 16 through 19.
Book a free consultation