image
The image widget displays and uploads pictures on binary fields, with more options than any other display widget, including a WebP pipeline that quietly generates five sizes per upload.
| Studio name | Image |
|---|---|
| Technical name | image |
| Field types | binary, many2one |
| Views | form, list, kanban |
| Module | web, present in every Odoo database |
| Used in core | 92 occurrences across 39 modules, including product, website_sale, hr, event, pos views |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes, via Odoo Studio (Enterprise) |
| Alternatives | image_url, binary, many2one_avatar, contact_image |
What the Image widget does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
size | selection / [w,h] | Display cap as a [width, height] pair, 0 meaning unconstrained: Small [0,90], Medium [0,180], Large [0,270], custom pairs allowed. Max sizes only; images never upscale. |
zoom | boolean | Shows a full-size preview tooltip on hover. |
zoom_delay | number | Milliseconds before the zoom preview appears. |
convert_to_webp | boolean | Converts uploads to WebP client-side and generates resized attachments plus JPEG copies for reports. GIF, SVG and WebP sources pass through. |
accepted_file_extensions | string | Restricts the file picker, e.g. ".png,.svg".(default: image/*) |
preview_image | field name | Binary field to display. Mandatory when the widget sits on a many2one (the source throws without it); on a binary field it can point at a smaller variant like image_128 for lighter lists. |
reload | boolean | Refreshes the image URL on record changes. Setting False freezes the first URL, occasionally useful in kanban cards that flicker.(default: true) |
img_class | string | Extra CSS classes on the img element. Read in extractProps only; it appears in no options panel or documentation. |
The size values are [width, height] pairs where 0 means unconstrained. The presets translate to heights: Small [0,90], Medium [0,180], Large [0,270]. A custom pair like [120,120] is legal in XML. Whichever side is 0 scales automatically, and the values are max sizes, never upscaling.
Working examples
The WebP upload pipeline
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The development branch shows no behavior changes; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source and tested on a clean database. |
| Odoo 18.0 | Verified | Same options and behavior. No XML changes needed. |
| Odoo 17.0 | Verified | Same options and behavior. No XML changes needed. |
| Odoo 16.0 | Verified | Same options and behavior. No XML changes needed. |
Upgrade note. Options are stable across Odoo 16 to 19; views carry over. The WebP derivative pipeline arrived during this range, so re-uploading legacy images on an upgraded database is the cheapest way to backfill modern formats for the website.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Widget on a many2one raises an error | preview_image is mandatory for many2one usage; the source throws without it. Add options="{'preview_image': 'image_128'}" naming the related binary field. |
| Placeholder shows instead of the image | Empty value, or the stored data failed to load as an image. Expected fallback; re-upload the file if the data is corrupt. |
| Old image keeps showing after replacement | The write_date cache-buster depends on the record actually saving. Save the record; the URL's unique token then changes and every view refreshes. |
| Attachment count exploded on media models | The WebP pipeline stores five sizes plus JPEG copies per upload, by design. Nothing to fix; it is the report-compatibility ladder described above. |
| PDF reports show blank where WebP images sit | The report references the WebP directly instead of the generated JPEG twin. Use the standard image helpers in the report so the JPEG derivative is picked. |
| Images look blurry in big cards | The stored source is smaller than the display cap; the widget never upscales. Upload a larger original (e.g. store image_1920, display capped). |
Image widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
image | Pictures stored on the record, with upload handling | Full option set: size caps, zoom, WebP pipeline, related-record display |
image_url | Images hosted elsewhere, referenced by URL | Char field with a link; nothing stored in the database |
binary | Non-image files: PDFs, spreadsheets, any download | Filename plus download button, no preview |
| many2one_avatar | A partner or record shown as a small round photo | Fixed avatar styling, no upload from this widget |
contact_image | Contact-card style photo display | Specialized presentation for partner forms |
Frequently asked questions
How do I control the size of an image field in Odoo?+
How do I enable image zoom on hover?+
What does convert_to_webp actually do?+
Can the image widget show a picture from a related record?+
Why do new uploads appear instantly everywhere?+
How do I restrict which file types users can upload?+
Product images slowing your site down?
Right-sized images, WebP everywhere the web is served and JPEG where PDFs need it, configured once at upload time. We tune Odoo media handling end to end, from catalog forms to website speed, on Odoo 16 through 19.
Book a free consultation