Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Importing .webp images using URL

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
importproductsimporterrorv17
4 Besvarelser
3818 Visninger
Avatar
Anders Nielsen

Im trying to import a lot of .webp images to my products using an URL, however I keep getting this error:

cannot identify image file  _io.BytesIO object at 0x7fa789b18090


It works fine with jpg and png, however i need them to be .webp format.


I tried converting the images to base64 and importing the strings instead, however as my base64 images are ~200k characters it can't fit in a csv/excel cell. 


Does anyone have a solution for this?

0
Avatar
Kassér
Avatar
D Enterprise
Bedste svar

Hii,

please check Pilow has Support webp using following code 

from PIL import features

print ( "Webp Support" , features . check ( 'webp' ))

if return False, you don`t have webp support in pillow

to enable webp, reinstall pillow 

if you are using ubuntu then first install 
libwebp using following command

sudo apt-get install libwebp-dev

after install libwebp you can install pillow 


please try this i hope it is usefull


0
Avatar
Kassér
Avatar
Randall Castro [Vauxoo]
Bedste svar

This error happens because the image library Odoo uses (Pillow/PIL) doesn't recognize the WebP format. While Pillow does support WebP, many Odoo installations don’t have this support enabled by default (it depends on whether the libwebp library is installed on the server).

Why does it work with JPG/PNG but not WebP?
  • JPG and PNG are natively supported by Pillow.
  • WebP requires Pillow to be compiled with libwebp support. If it's missing, you’ll get errors like the one you reported.
Possible solutions
  1. Enable WebP support on the server
    • If you have access to the Odoo server, install libwebp and reinstall Pillow:


      sudo apt-get install libwebp-dev pip3 uninstall pillow pip3 install --no-cache-dir pillow

      This will enable WebP support and allow you to import images from URLs directly.
  2. Convert the images before importing
    • If you cannot change the server setup, the most stable option is to convert the WebP images to JPG/PNG using a pre-processing script (e.g., with cwebp or ImageMagick) and then import them.
  3. Import images as base64 but without using CSV
    • If the problem is the character limit in CSV/Excel, you can upload images via XML or using a Python script through Odoo's API (xmlrpc or jsonrpc). This avoids the cell limit issue.
    Example using the API:


    import base64 import requests image_url = "https://example.com/image.webp" image_data = base64.b64encode(requests.get(image_url).content).decode('utf-8') models.execute_kw(db, uid, password, 'product.template', 'write', [[product_id], {'image_1920': image_data}])

Recommendation

If you have access to the server, enabling WebP support in Pillow is the easiest fix. Otherwise, convert your images to JPG/PNG or use an alternative import method (script/API) to bypass the CSV cell limit.

0
Avatar
Kassér
Avatar
J.A. Daniel Göppner
Bedste svar

Hi Anders

can you check if you have the right pillow version installed?

try to uninstall it and install it again. Looks from the first view an error occurring from pillow library

I will make another test, debug and come back to you, if the recommendation above, does not solve the problem. (could be that at the end, you have to create a ticket to odoo suppport)

0
Avatar
Kassér
Emilio San Jose

Hi Daniel, I’m having the same issue in Odoo 18 SaaS, so I guess that’s something that Odoo has to fix on their end?

J.A. Daniel Göppner

Good input, than yes
Please create a ticket to odoo, and submit at best, a video showing the issue in runbot
Thank you for your contribution

Antonino Brezzo

Hello, Daniel. I attempted to resolve this by adding the Pillow version to the requirements.txt file “Pillow>=10.0” and creating the apt.txt file with the text “libwebp-dev,” but it still does not function. Is there another way to resolve this?

Avatar
Emilio San Jose
Bedste svar

Hi Anders,

Having the same issue in Odoo 18. Were you able to solve it?

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
error when importing opening balance
import v17
Avatar
0
aug. 24
1986
can't match fields when importing records
import v17
Avatar
Avatar
1
jun. 24
2693
Import Records: How to link Product Attributes
import products attribute spreadsheets v17
Avatar
Avatar
Avatar
2
dec. 23
2727
Updating imported products workflow... Løst
import products
Avatar
Avatar
1
mar. 15
4198
how can i handel the import error
product import importerror
Avatar
0
mar. 25
1836
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now