Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB image upload

  • Joomrick1
  • Joomrick1
  • OFFLINE
  • Posts: 11
  • Thanks: 0
  • Karma: 0
11 years 8 months ago #225073 by Joomrick1
CB image upload was created by Joomrick1
Hi Joomlapolis,

I just have a question with regards to image uploading in CB. I encounter the "Fatal error: Allowed memory size of 134272328 bytes exhausted (tried to allocate 4452 bytes).." in directory. I have noted the problem happens when an uploaded image size exceeds approx. 3000 x 3000, however the file size is well under the default 2Mb limit. The test file was actually 208KB.
My web host allows a memory_limit is 128Mb. I was thinking CB image upload allowed for any image dimension size, as long as was under the default 2Mb?
Also, if I was to change this default to 10Mb (allowing for large photos), would that still be ok?

With regards to the image software, what are the main differences between ImageMagick, NetPBM and the default GD2 library? Is GD2 library preferred, or do any of the other softwares have advantages over the others?

So do the programs do the following - break the image into two smaller images and deletes the original?

It would be interesting to hear your thoughts on what may be the issue with the image upload for such a small file size vs image dimensions.

Thankyou for your help!

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
11 years 8 months ago #225075 by krileon
Replied by krileon on topic CB image upload
Resizing doesn't work with normal image data. It's exploded to RAW. So when it's processing and resizing it takes about 2-4x the size of the actual image to process (2mb image takes for example 4-5mb of memory to process) to handle such a large image and your site looks like it's already too close to its limit of 128mb. GD library is slow as well. The only way to further speed it up is to use ImageMagick for example. Alternative is to increase your memory limit or try trimming out some plugins/extensions that are consuming large amounts of memory.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: Joomrick1

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • OFFLINE
  • Posts: 2174
  • Thanks: 463
  • Karma: 352
11 years 8 months ago #225086 by beat
Replied by beat on topic CB image upload
Another huge difference:
- GD2 uses PHP memory
- ImageMagic does not

So for large images, ImageMagic is probably your best choice, if your hoster supports it...

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: Joomrick1

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum