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 noelboss
      Short description of the issue
      Since PW 3.0.88: When I try to retrive a croped file using the api filesManager() and it's basename, I get the original version instead of the croped variation.
      Expected behaviour
      Looking up a variation using the path and filesManager should return the variation file.
       $page->filesManager->getFile("/path/to/filebasename.400x400.jpg"); // $file->basename > filebasename.400x400.jpg Actual behavior
      The variation is returned.
       $page->filesManager->getFile("/path/to/filebasename.400x400.jpg"); // $file->basename > filebasename.jpg  
      » Is this a bug or do I miss something here?
       
      Code:
      dump($page->filesManager->path.$input->get->filename('f')); $file = $page->filesManager->getFile($page->filesManager->path.$input->get->filename('f')); dump($file); dump($page->filesManager->path.$file->basename); Output:
      "/home/ubuntu/workspace/www/site/assets/files/-1579/colin-rex-434063.400x400.jpg" (79) ProcessWire\Pageimage #796f pageimages protected => ProcessWire\Pageimages #d195 original protected => ProcessWire\Pageimage #796f { RECURSION } variations private => null imageInfo private => array (2) width => 0 height => 0 error protected => "" pagefiles protected => ProcessWire\Pageimages #d195 data protected => array (6) basename => "colin-rex-434063.jpg" (20) description => "" tags => "" formatted => true modified => 1516025386 created => 1516025386 useFuel protected => true _instanceNum private => 870 localHooks protected => array () trackChanges private => 2 changes private => array (1) formatted => array (1) 0 => null _notices protected => array (3) errors => null warnings => null messages => null _wire protected => ProcessWire\ProcessWire #28d0 in .../www/site/templates/app/utils/download.php:29
      "/home/ubuntu/workspace/www/site/assets/files/-1579/colin-rex-434063.jpg" (71)
    • By Krlos
      Hi,
      I'm having problems to insert images on a Ckeditor body field. The images are uploaded to a image field and the page is saved.
      When I do clic in Ckeditor Image button I get:
       
      Failed to init module: ProcessPageEditImageSelect - No page specified The requested process does not exist The process returned no content. I'm using the superuser account.
      Processwire version: 3.0.79
      This is the first time I get an error in Processwire...
      Thank you.

    • By Robin S
      An experimental module for adding images to a field via pasting one or more URLs.
      Add Image URLs
      Allows images to be added to an images field by pasting URLs.

      Usage
      Install the Add Image URLs module.
      A "Paste URLs" button will be added to all image fields. Use the button to show a textarea where image URLs may be pasted, one per line. Images are added when the page is saved.
       
      https://github.com/Toutouwai/AddImageUrls
    • By kalimati
      Processwire allows us to define predefined tags for images. What if I want to use a repeater field on the page for the purpose? How can I use values of this repeater field as the list of available tags for image fields?
      Thanks.
    • By Cloud8888
      Greetings from germany,

      i develop a shop for a customer and wanted to give them the opportunity to find products without any images so they could easily fill this empty sites.
      The problem is, that this images are placed inside a repeater.
      So the structure for the repeater field is:
      title
      bild (where 1 image can be placed)
      bildrecht (another repeater for placing the copyright  text)

      But here comes my problem.
      I designed a selector that should show me all sites where the repeater count is 0.
      Like :
      template=sorte|artikel,bilderrepeater.count=0
      But it also shows me results, where the repeater count is still 1 or even greater.
      If i save one of these bad results, the selector works fine.

      Is there a way around it ?
      I use pw 3.0.76.