I currently have an installation of Drupal 7 and I am having trouble with uploading images through an image field. The images upload however sometimes, randomly it seems, the images arent auto resized and there is no thumbnail. There is no thumbnail that appears next to the image after it is uploaded as well. I am not sure why this happens and it is very annoying. I installed a patch that was supposively similar to the problem I had but that didnt work either. The permissions are also set correctly. Anyone else have problems with this? I am going nuts trying to figure this out. thanks!
Here is the error I get when I look at the reports for one of the images:
Unable to generate the derived image located at public://styles/thumbnail/Fressen_6.jpg.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | LK_MBBARSRTCORRECTED2.jpg | 674.79 KB | ledzepp94 |
| #2 | 888574_image_derivate.patch | 348 bytes | anarcat |
Comments
Comment #1
anarcat commentedGoing to take a quick look at this. Seems more like a support request than an actual bug to me...
Comment #2
anarcat commentedSo I looked at the image code quickly, and it seems like you should have more information about the reason for this error in the watchdog. There is one single place where that process can fail silently, and it's during the loading of the image.
So the attached patch adds a watchdog warning explaining the reason of this problem, please try to reproduce the problem again with the patch applied and paste here the watchdog messages you find.
Comment #3
anarcat commentedsomeone else needs to review/test this to reproduce.
Comment #4
cyberschorschWell, I cannot reproduce the error. I applied your patch and generated a lot of nodes but there is no error. I think it is not a bug of the module but a problem with the browser?
Well anyway, we need more info from the op to get this working...
Comment #5
cyberschorschComment #6
franskuipers commentedI tried to reproduce the problem on Ubuntu 10.04 with Chrome browser a number of times, (without installing the patch).
Comment #7
cyberschorschIs that issue really critical?
Comment #8
anarcat commentedas long as this is a support request, it's out of the queue, so we shouldn't worry about it until we get a way to reproduce this.
thanks for the testing.
Comment #9
marvil07 commentedremoving critical status since there is not enough information to reproduce this, it is not confirmed and it is a support request until now, but leaving in major to avoid forgetting to notice what anarcat found as a possible hidden fail.
Comment #10
ledzepp94 commentedType image
Date Tuesday, August 24, 2010 - 15:02
User admin
Location http://laurakirar.com/v2/image/generate/thumbnail/public/LK_MBBARSRTCORR...
Referrer http://laurakirar.com/v2/node/28/edit?destination=admin%2Fcontent&render...
Message Failed to load image from source public://LK_MBBARSRTCORRECTED2.jpg
That is the error i got after installing the watchdog patch.
I've attached the image that failed.
This is the error for the derivatives it was suppose to create:
User admin
Location http://laurakirar.com/v2/image/generate/thumbnail/public/LK_MBBARSRTCORR...
Referrer http://laurakirar.com/v2/node/28/edit?destination=admin%2Fcontent&render...
Message Unable to generate the derived image located at public://styles/thumbnail/LK_MBBARSRTCORRECTED2.jpg.
Severity notice
Hostname 157.130.93.118
Also, some images that do upload and create a thumbnail, they do not create a large and a medium, any clue as to why this is? I was under the impression it was to make all three.
ADDITIONAL:
I took an image that did work, I put in photoshop and resized it so file size was bigger and then saved it again, uploaded it and it didn't work. The actual original image is uploaded but no deriviatives are made.
I Reset the image styles back to default and im still having the upload problem for some images BUT: the weird thing is that when I save the node with all the images and then actually view that node page, it seems to generate the large images, for the images that actually work that is. So for example I have a node with 5 images and when I save that node it brings me to the actual node:
http://laurakirar.com/v2/node/28
which lists out all the images and when i view the source of the images i see:
However I am pulling the images dynamically from a template page and I have the image set to:
but it doesnt generate the image.....very off as it seems to be the exact code as the actual node page.
These are the files I have in my theme folder if its any help:
laurakirar.info
page--front.tpl.php
page.tpl.php
page--node--1.tpl.php
also have an images folder and css folder.
template.php
This definitely seems like a bug to me as I am able to replicate it over and over.
Comment #11
ledzepp94 commentedComment #12
asimmonds commented@ledzepp94:
You had opened the issue against 7.0-alpha6 and I suspect that your problem could be related to #844676: (Tests needed) Stream wrappers stream_seek() return is invalid which was fixed after the alpha6 release.
Can you retry on a newer 7.x-dev install?
Comment #13
ledzepp94 commentedHello,
I did install that patch, shouldn't that have been enough to fix that particular issue?
Comment #14
asimmonds commented@ledzepp94:
It's possible that that issue could be related to your problem, but we do not want to waste time trying to track down a problem in a much older alpha release when it could have been fixed in the current dev version.
If you only want to use releases, then alpha7 has just been released, http://drupal.org/drupal-7.0-alpha7
Could you try to reproduce this issue with that.
Comment #15
eojthebrave@ledzepp94 can you test this using the latest D7-BETA-3. My suspicion is that this was fixed by the patch committed in #844676: (Tests needed) Stream wrappers stream_seek() return is invalid
Comment #16
byrondover commentedI'm experiencing the same issue (or at least part of it) in D7-RC1.
My expectation (from how ImageCache works in Drupal 6) when I upload an image is for every preset image style to be automatically cached in the files directory, right then and there.
Instead, in D7 it would appear each image style cache file is generated individually, and only when called by some Drupal hook. For example, if I specify three image styles (i.e. one thumbnail, one medium and one large) but nowhere in my website do I explicitly insert an request to transform images to, say, medium (i.e. by customizing a content type), then the medium-sized image is never generated.
While this may be space-saving, it certainly makes custom theming considerably more complex for the average user. If I want to include a scaled smaller or larger version of any given image in one of my pages, I now have to study up on my Drupal 7 API to figure out the correct function call (as against simply changing the image path using CSS, for example).
Perhaps this is intended functionality to minimize junk in the files directory. If so, I think it comes at a high convenience cost for novice theming.
Or perhaps I'm missing something glaringly obvious and this is just a ego-inflated support ticket.
For reference, certain ImageCache sub-modules seems to circumvent this problem in D7 by forcing Drupal to generate these thumbnails immediately (e.g. ImageCache Profiles 7.x for user uploaded profile images specifically). These modules, however, have their own set of limitations and bugs which don't necessarily speed things along.
I believe there is another open ticket from 7.0-alpha5 which asks much the same question, but as of this posting hasn't received much attention.
http://drupal.org/node/830492
Any and all feedback would be much appreciated!
Comment #17
tstoecklerThat images derivatives are only created on demand is by design. Whether that is a good or bad design, I won't judge, but this will not be changed in Drupal 7. For including images in your theme have a look at theme_image_style.
I'm marking this fixed, because it seems the actual bug has been fixed by #844676: (Tests needed) Stream wrappers stream_seek() return is invalid.
Please reopen if actual errors persist. (#16 is not an error)
Comment #18
byrondover commentedThanks very much tstoeckler, I'm glad have this finally cleared up.