<p>The fix (for my project) was to enable the PHP output_buffering directive.</p>

<p>I added this to the account specific php.ini file for the hosting account.</p>

<pre><code>output_buffering = On
</code></pre>

<p>This from the web hosts docs to explain why this fix worked:</p>

<p>*"Doing a header redirect requires outputting an HTTP header with the response. The problem is, if PHP has already begun outputting the body of the document, it cannot then output a header because the headers ended when the body started.   </p>

<p>Output buffering prevents PHP from outputting any part of the body of the document until the output buffer is flushed (or PHP exits). This allows you to output headers at any time."*<br>
<a href="http://kb.site5.com/php/how-to-repair-headers-already-sent-php-errors/" rel="nofollow noreferrer">http://kb.site5.com/php/how-to-repair-headers-already-sent-php-errors/</a> </p>

<hr>

<p>Another thing to try is add <code>'imageDriver' =&gt; 'gd,</code> to your config file. This helped me with issues on a different server.<br>
<a href="https://docs.craftcms.com/v2/config-settings.html#assets" rel="nofollow noreferrer">https://docs.craftcms.com/v2/config-settings.html#assets</a></p>

CC BY-SA 4.0
2019-05-23T20:13:59.333Z
2019-06-25T01:42:45.057Z
2019-06-25T01:42:45.057Z
Anna_MediaGirl
<p>I'm able to upload images correctly to the server. I can see the thumbnail and view the larger image inside the control panel on the Assets page. However, the front-end image transforms result in a 500 error. </p>

<image-transforms>
Image transforms not working on front-end
# Image transforms not working on front-end

(Asked by: username_0 on 2019-05-23)

I'm able to upload images correctly to the server. I can see the thumbnail and view the larger image inside the control panel on the Assets page. However, the front-end image transforms result in a 500 error.

**Tags:** image-transforms

---

## 1 answers

### Answer by username_0 on 2019-05-23. Score: 3 | Accepted answer

The fix (for my project) was to enable the PHP output_buffering directive.
I added this to the account specific php.ini file for the hosting account.
output_buffering = On

This from the web hosts docs to explain why this fix worked:
*"Doing a header redirect requires outputting an HTTP header with the response. The problem is, if PHP has already begun outputting the body of the document, it cannot then output a header because the headers ended when the body started.   
Output buffering prevents PHP from outputting any part of the body of the document until the output buffer is flushed (or PHP exits). This allows you to output headers at any time."*
http://kb.site5.com/php/how-to-repair-headers-already-sent-php-errors/ 

Another thing to try is add 'imageDriver' => 'gd, to your config file. This helped me with issues on a different server.
https://docs.craftcms.com/v2/config-settings.html#assets


---

