# Image upload fails because of high picture resolution

**URL:** <https://discourse.getcockpit.com/t/image-upload-fails-because-of-high-picture-resolution/844>\
**Category:** Support\
**Created:** [May 27, 2019, 12:31pm UTC](https://discourse.getcockpit.com/t/image-upload-fails-because-of-high-picture-resolution/844 "2019-05-27T12:31:45Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [June 4, 2019, 9:47am UTC](https://discourse.getcockpit.com/t/image-upload-fails-because-of-high-picture-resolution/844/14 "2019-06-04T09:47:44Z")

</div>

> [@alessandro](#):
>
> I increased it to 512M but didn’t solve the problem.

Hmm… I don’t know, what could cause your issue, other than that. Maybe you have another RAM hungry process somewhere, that doesn’t cleanup correctly or your system setup is different and something uses more RAM here and there.

Can you double check, if your `memory_limit` change took effect?  
Did you try it with more than 512? If that doesn’t work, the issue might be somewhere else.

If you want to reproduce my debugging procedure, you can add my [simple debug log](https://github.com/raffaelj/cockpit-scripts/blob/master/debugging/debug_info.md#a-very-simple-debug-helper) code to `/config/bootstrap.php` and than call `debug(memory_get_usage());` before and after the `imagecreatefromejpeg()` parts to see the memory peaks.

> [@alessandro](#):
>
> Is there an integration with Cloudinary or something like that?

I don’t know, how and if it works:

> [@Cockpit cloudinary addon](https://discourse.getcockpit.com/t/cockpit-cloudinary-addon/612):
>
> I really love cockpit, but I didn’t find any option to upload images via API. That’s why, I made one with cloudinary. The process is like - upload image to Cloudinary and attach the image URL to Cockpit collection. I know this is not a very good option to skip the whole cockpit assets manager but it does help me for my project. Could one of you give a try and feedback me?, thanks in advance.

---

_[View the full topic](https://discourse.getcockpit.com/t/image-upload-fails-because-of-high-picture-resolution/844)._
