# Ошибка загрузки изображения при использовании ресайзера

**URL:** <https://meta.discourse.org/t/image-upload-error-when-using-resizer/142316>\
**Category:** Bug\
**Created:** [22.Февраль.2020 01:08:47 UTC](https://meta.discourse.org/t/image-upload-error-when-using-resizer/142316 "2020-02-22T01:08:47Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![dan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan/32/101549_2.png) [@dan](https://meta.discourse.org/u/dan)\
**Post date:** [25.Март.2020 11:51:50 UTC](https://meta.discourse.org/t/image-upload-error-when-using-resizer/142316/10 "2020-03-25T11:51:50Z")

</div>

Я исправил две проблемы здесь:

1. Конвейер оптимизации изображений конвертировал PNG в JPEG, а затем пытался оптимизировать полученные JPEG с помощью операций для изображений PNG.

2. Ошибки ImageMagick возвращались пользователю, но они были совершенно бесполезны (например, `convert: improper image header...`)

> <https://github.com/discourse/discourse/pull/9257>
>
> This pull request addresses two issues:
> 
> 1. The image optimization pipeline tr…ied to optimize \`jpeg\`s using the operations for \`png\` images.
> 
> 2. ImageMagick errors were returned to the user, but were not helpful at all.

---

_[View the full topic](https://meta.discourse.org/t/image-upload-error-when-using-resizer/142316)._
