# Avatares com extensão .svg não carregam na versão 2.2.0.beta3 +64

**URL:** <https://meta.discourse.org/t/avatars-with-svg-extension-dont-loaded-in-2-2-0-beta3-64-version/99898>\
**Category:** Bug\
**Created:** [Outubro 18, 2018, 6:58pm UTC](https://meta.discourse.org/t/avatars-with-svg-extension-dont-loaded-in-2-2-0-beta3-64-version/99898 "2018-10-18T18:58:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [Outubro 19, 2018, 8:16am UTC](https://meta.discourse.org/t/avatars-with-svg-extension-dont-loaded-in-2-2-0-beta3-64-version/99898/5 "2018-10-19T08:16:45Z")

</div>

I had a look here and confirmed this is a regression.

> <https://github.com/discourse/discourse/blob/5f86564da1bc7c921bf1ed791b3ebc00b5917525/app/models/optimized_image.rb#L32>

There was a change made to use `IM_DECODERS` to verify if an image can be optimized but we actually don’t need to optimize SVGs at all. What used to happen in the previous versions is that SVG “optimized images” are basically a copy of the original image.

> <https://github.com/discourse/discourse/blob/5f86564da1bc7c921bf1ed791b3ebc00b5917525/app/models/optimized_image.rb#L79-L80>

I think we should just avoid creating optimized images for SVG altogether and retain support.

---

_[View the full topic](https://meta.discourse.org/t/avatars-with-svg-extension-dont-loaded-in-2-2-0-beta3-64-version/99898)._
