texobyte

Odd behavior when uploading images

Recommended Posts

I have been plagued by this issue since day one. I cannot access or use any image I have uploaded. I can see them in the directory on the server and when I click on an image I can see a preview in the editor but as the video Video in my dropbox shows it doesn't provide me with a way to utilize those images. I can't see anything obvious.

I did upgrade to 3.0.34 and have left the site pretty bare bones until this issue is resolved.

 

Thanks in advance!

processwire-images-bug.mp4

Share this post


Link to post
Share on other sites

My guess would be that your assets/files folder doesn't have read permission.

Do a quick recursive change (to get all the subfolders as well) to 777 to test and if that works, then sort out the proper owner/permission settings.

Share this post


Link to post
Share on other sites

What seems a bit strange is that the full image is displayed alright on click on the thumbnail, but the thumbnails and pwimage don't work. If it were read permissions, the full image shouldn't be visible either.

My first three items to check would be:

  • Third party modules
  • Apache's mod_security
  • Browser security plugins

The raw requests made for the thumbnails might also be worth a look.

Share this post


Link to post
Share on other sites

Permissions changed.

I noticed in the response header the x-xss-protection: 1; mode = block: is that an issue?

HTTP/1.1 200 OK
Date: Wed, 28 Sep 2016 17:41:41 GMT
Content-Type: image/jpeg
Content-Length: 42
Server: Apache/2
X-Frame-Options: SAMEORIGIN
Last-Modified: Wed, 28 Sep 2016 17:41:39 GMT
Etag: "2a-53d94dfa00482"
Accept-Ranges: bytes, bytes
Cache-Control: max-age=2592000
Expires: Fri, 28 Oct 2016 17:41:41 GMT
x-xss-protection: 1; mode=block
Connection: Keep-Alive
Age: 0

 

Share this post


Link to post
Share on other sites
Just now, texobyte said:

Permissions changed.

I noticed in the response header the x-xss-protection: 1; mode = block: is that an issue?


HTTP/1.1 200 OK
Date: Wed, 28 Sep 2016 17:41:41 GMT
Content-Type: image/jpeg
Content-Length: 42
Server: Apache/2
X-Frame-Options: SAMEORIGIN
Last-Modified: Wed, 28 Sep 2016 17:41:39 GMT
Etag: "2a-53d94dfa00482"
Accept-Ranges: bytes, bytes
Cache-Control: max-age=2592000
Expires: Fri, 28 Oct 2016 17:41:41 GMT
x-xss-protection: 1; mode=block
Connection: Keep-Alive
Age: 0

 

Never mind - that's not it according to Google.

Share this post


Link to post
Share on other sites

Ok on the server when viewing the .jpgs I click on the full size images and I get the image but on the thumbnails that are generated I get

Quote

The image "http://texobyte.com/site/assets/files/1021/zenbook_review-10.0x260.jpg" cannot be displayed because it contains errors.

Thumb: http://texobyte.com/site/assets/files/1021/zenbook_review-10.0x260.jpg

Full size: http://texobyte.com/site/assets/files/1021/zenbook_review-10.jpg

Share this post


Link to post
Share on other sites

Might also be a memory issue or a case of format incompatibility between your images and GD. Maybe this thread could be helpful:

 

  • Like 1

Share this post


Link to post
Share on other sites

It is a memory issue, this is the error in the log.

Quote

/hermes/bosnaweb17a/b2188/ipg.texobytecom/texobyte/site/assets/files/1021/zenbook_review-2.1080x0.jpg - zenbook_review-2.1080x0.jpg - not enough memory to load

ill take a look down this path.

Share this post


Link to post
Share on other sites

FIXED: The images I was uploading were 5184x3456 and I didn't realize that.

So I was killing the memory load on a crazy large image.

  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By LMD
      I'm wondering if it is possible to add a label to the description input in image fields (in the admin).
      I'm using the module Image Extra, which has labels for each input, but I'd like to add a label to the default 'description' input too. The image below illustrates this:

       
      If there is no way (no hook?) then, I suppose I could just not use the default description and add a new description input with the Image Extra module.  But I thought I'd ask in case I (or others) ever want to do this without using the module (i.e. just the one input required).
      I'm using PW 3.0.98
      Thanks.
      ---
      FYI: yes, that is a cat and not a quilt -- this is on my local dev server and I don't have the actual photos yet! She is on a quilt, so it counts... technically.
       
    • By Andreas Augustin
      Hello!
      Can I deactivate the renaming feature of images and the editing (croping, rotating etc) in the processwire admin panel?
       
    • By cst989
      I have a file I want to access with ajax:
      The purpose of this file is to iterate through a repeater, and get the image from each entry.
      The number of images in the image field is set to 1, and just for good measure, to return a single image.
      And my code:
      // site/ajax/processImage.ajax.php?group=1206 require_once($_SERVER['DOCUMENT_ROOT'].'/index.php'); $resourceGroup = (int) $_REQUEST['group']; // get the Repeater field $resources = $pages->get($resourceGroup)->resources; foreach ($resources as $resource) { echo $resource->title; // Works as expected echo $resource->image->url; // /site/assets/files/1259/ echo $resource->image; // filename.jpg echo $resource->image->description; // nothing } See comments above for what is output, why isn't URL giving me a full URL, and no description is available?
      If I try to access $image->size() I get the following fatal error:
      Error: Uncaught exception 'ProcessWire\WireException' with message 'Method Pageimages::size does not exist or is not callable in this context' in F:\sites\<sitename>\wire\core\Wire.php:519
       
    • By Roberts R
      Solution :
       
      Issue :
      Fresh install ProcessWire 3.0.39 + multilangual support
      In video it shows how it goes. And I can't figure it out.  It happens for few of my sites.
      td;tl : Upload 5 image in images field ->  Save -> 2 left.
      EDIT : Files are in "/assets/files/id"
      processwire-bug.mp4
    • By cosmicsafari
      Hi all,
      I am working on a site which involves a lot of image upload fields, 99% of the time it works perfectly but I have noticed that every so often image variations will be missing.
      Like the original uploaded image is fine but maybe 1 or 2 out of the variations is just blank.
      The variation files will appear within the assets folder but they will be just in name only without any actual image content.
      Since its quite a random thing I am finding it rather difficult to figure out why this happens?
      Any ideas?