Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

Importing .webp images using URL

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
importproductsimporterrorv17
4 Відповіді
3869 Переглядів
Аватар
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
Аватар
Відмінити
Аватар
D Enterprise
Найкраща відповідь

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
Аватар
Відмінити
Аватар
Randall Castro [Vauxoo]
Найкраща відповідь

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
Аватар
Відмінити
Аватар
J.A. Daniel Göppner
Найкраща відповідь

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
Аватар
Відмінити
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?

Аватар
Emilio San Jose
Найкраща відповідь

Hi Anders,

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

0
Аватар
Відмінити
Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Related Posts Відповіді Переглядів Дія
error when importing opening balance
import v17
Аватар
0
серп. 24
1999
can't match fields when importing records
import v17
Аватар
Аватар
1
черв. 24
2715
Import Records: How to link Product Attributes
import products attribute spreadsheets v17
Аватар
Аватар
Аватар
2
груд. 23
2741
Updating imported products workflow... Вирішено
import products
Аватар
Аватар
1
бер. 15
4207
how can i handel the import error
product import importerror
Аватар
0
бер. 25
1848
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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