Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Importing .webp images using URL

Odoberať

Get notified when there's activity on this post

This question has been flagged
importproductsimporterrorv17
4 Replies
3889 Zobrazenia
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
Zrušiť
Avatar
D Enterprise
Best Answer

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
Zrušiť
Avatar
Randall Castro [Vauxoo]
Best Answer

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
Zrušiť
Avatar
J.A. Daniel Göppner
Best Answer

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
Zrušiť
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
Best Answer

Hi Anders,

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

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
error when importing opening balance
import v17
Avatar
0
aug 24
2001
can't match fields when importing records
import v17
Avatar
Avatar
1
jún 24
2719
Import Records: How to link Product Attributes
import products attribute spreadsheets v17
Avatar
Avatar
Avatar
2
dec 23
2747
Updating imported products workflow... Solved
import products
Avatar
Avatar
1
mar 15
4209
how can i handel the import error
product import importerror
Avatar
0
mar 25
1853
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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