Forum

Thread tagged as: Problem, Configuration

Images uploading intermittently to Assets

Hi,

I'm having problems when I upload image files to pages, posts or Assets folder. Some images upload and are visible. Some upload but show a blank square in bucket Screengrab - other images appear to upload but do not load into the bucket.

Any ideas?

Diag:

Perch: 2.8.18, PHP: 5.4.36, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.18), assets (2.8.18), categories (2.8.18), perch_blog (5.0), perch_forms (1.8.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/harvests/public_html/perch
PERCH_CORE: /home/harvests/public_html/perch/core
PERCH_RESFILEPATH: /home/harvests/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 10M, Max POST 8M, Memory: 48M, Total max file upload: 8M
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/harvests/public_html
HTTP_HOST: harveststudiosbookshop.ie
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Orla Kirwan

Orla Kirwan 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I presume they're not transparent images?

;-) No, they are not transparent. Those particular ones show blank in Assets but are visible on the webpage.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there a difference between the ones that work and the ones that don't work? What sort of file sizes and image dimensions are they?

I had been playing around with the image sizes earlier and reducing the MB as I though this might be causing the problem. I reduced a bundle of images using TinyJPG just to experiment. All I have been working with since have been under 1MB - usually around 700KB. Dimensions vary from 360x300 (cropped specifically) to 2500x3500 (to be cropped by Perch). The smaller ones are always ok but there is no clear discriminatory reason on the larger ones.

Could it be just a case of memory usage when uploading the files? I have definitely used Perch before to handle larger image files.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's certainly possible that with larger images you're running out of memory. Is the available memory contested with other sites or users? PHP is configured with a 48MB limit, but of course that doesn't always mean that the full 48MB is available to use.

It seems to be a memory issue. The site is on shared hosting but checking on another site where memory allocated is 256MB I can see Assets has no problems uploading large full width hero images.

Thanks for your help!

Drew McLellan

Drew McLellan 2638 points
Perch Support

No problem. Unfortunately resizing images is just one of those things that uses a lot of memory.