# /\_next/image returns 500 error

**URL:** <https://answers.netlify.com/t/next-image-returns-500-error/95611>\
**Category:** Support\
**Tags:** nextjs\
**Created:** [June 29, 2023, 6:44am UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611 "2023-06-29T06:44:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![taraktikos](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/taraktikos/32/52248_2.png) [@taraktikos](https://answers.netlify.com/u/taraktikos)\
**Post date:** [June 29, 2023, 6:44am UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/1 "2023-06-29T06:44:14Z")

</div>

The edge function log is empty:

```auto
No results found for **next/image handler**

```

All images on site return 500  
It was working well two days ago. The build is running on GitHub action  
Site ID: 9a53a75a-845d-4d68-89fc-a37541fe92ba

The issue is related to [I am getting 500 error on my next js application without changing any code - #4 by taraktikos](https://answers.netlify.com/t/i-am-getting-500-error-on-my-next-js-application-without-changing-any-code/95590/4)  
I tried to remove middleware but it seems like all edge functions stopped working

---

<div class="post-metadata">

**Author:** ![raikkimi](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@raikkimi](https://answers.netlify.com/u/raikkimi)\
**Post date:** [June 29, 2023, 7:23am UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/2 "2023-06-29T07:23:31Z")

</div>

Same problem for me, yesterday suddenly the site stopped working.  
What worked for me is turning off the **NEXT\_FORCE\_EDGE\_IMAGES**

---

<div class="post-metadata">

**Author:** ![SneakSpiceak](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/sneakspiceak/32/51346_2.png) [@SneakSpiceak](https://answers.netlify.com/u/SneakSpiceak)\
**Post date:** [June 29, 2023, 10:12am UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/3 "2023-06-29T10:12:40Z")

</div>

I’ve encountered the same issue and while your solution works, the problem now is that my images will be in a wrong format. So i’m hoping a fix is coming soon.

---

<div class="post-metadata">

**Author:** ![raikkimi](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@raikkimi](https://answers.netlify.com/u/raikkimi)\
**Post date:** [June 29, 2023, 10:56am UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/4 "2023-06-29T10:56:11Z")

</div>

Absolutely, image optimization is not working this way, so we need an actual solution, but for the moment a at least it’s not 500 error.

---

<div class="post-metadata">

**Author:** ![Basa](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Basa](https://answers.netlify.com/u/Basa)\
**Post date:** [June 29, 2023, 11:58am UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/5 "2023-06-29T11:58:09Z")

</div>

Same problem over here ,this happend overnight randomly while everything used to work just fine!

---

<div class="post-metadata">

**Author:** ![taraktikos](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/taraktikos/32/52248_2.png) [@taraktikos](https://answers.netlify.com/u/taraktikos)\
**Post date:** [June 29, 2023, 12:09pm UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/6 "2023-06-29T12:09:49Z")

</div>

I also temporarily solved the image issue with NEXT\_DISABLE\_EDGE\_IMAGES: true flag. But middleware still doesn’t work

---

<div class="post-metadata">

**Author:** ![Basa](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Basa](https://answers.netlify.com/u/Basa)\
**Post date:** [June 29, 2023, 12:15pm UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/7 "2023-06-29T12:15:28Z")

</div>

for me disabling the edge images worked aswell

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [July 5, 2023, 12:21pm UTC](https://answers.netlify.com/t/next-image-returns-500-error/95611/10 "2023-07-05T12:21:46Z")

</div>

We were trying to roll-out some changes, but the service we use to feature-flag items is causing some hiccups. As soon as we noticed the issue, we have paused the roll-out, so everything should be working as expected right now, and are investigating what went wrong and how to prevent it.
