Posted by jyve on December 15, 2011 at 3:19pm
12 followers
| Project: | Adaptive Image |
| Version: | 7.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'm having troubling to get this module to work. First an overview of how I set up my Image Style:
- I went to the thumbnail Image Style, and added an Adaptive effect, and set the break-points to 480, 360.
- I removed the other scale effect for that Image Style
Am I understanding it correctly that a thumbnail will now be 480 pixels on a desktop, and 360 pixels on a screen that is 360 pixels or smaller? If so, this approach seems mostly usefull for full-width pictures, right?
Apart from my confusion, if I set the thumbnail Image Style to one of my pictures, it refers to an image in /files/styles/thumbnail/public/480/, but the image in that folder is still its original size: 1680 pixels.
Comments
#1
#2
+1, I am having this same issue.
I'm getting this error printed out with this issue:
Notice: Undefined index: effect callback in image_effect_apply() (line 1159 of /../../../drupal/modules/image/image.module).#3
+1, I am having this same issue.
#4
I suspect the problem is with lines 40 and 41 in adaptive_image.image.inc:
$style['effects'][1]['data']['width'] = $resolution;$style['effects'][1]['data']['height'] = NULL;
The effect index, which can have any value, is hardcoded to 1.
I have attached a patch which uses foreach to find the adaptive_image effect and apply width to it.
#5
Having the same issue. When adding a new image the error message is printed:
Notice: Undefined index: effect callback in image_effect_apply() (line 1159 of /../../../drupal/modules/image/image.module).#6
I was getting the same error message though my images were dynamically resizing. Nonetheless I wanted to apply the patch and used:
git apply style-effect-index-1371894-4.patchbut it did not apply the patch, I am not sure why. I also tried:
git apply -p0 style-effect-index-1371894-4.patchAt any rate it was easy enough to implement the patch code manually. I will monitor my logs to see if I still get this error.
#7
I'm not seeing any error messages, but i'm experiencing the same bug—images appear in the correct style folder, but they're not resizing.
Two things come to mind. First, at the moment i have only one effect enabled for my chosen style: the adaptive effect that declares my desired resolution break-points. Am i missing something obvious? Should i also be adding some kind of scaling effect? If so, how? And, if so, i think this should be clear in the documentation.
Second, i'm running Media module as the widget handling my image fields. Could this be causing the problem?
#8
Initial tests of the patch in #4 on an iPhone 4S and a 17-inch MacBook Pro (resolution set to 1920x1200) seem to be producing correctly sized images. Many thanks, alexku, for the patch!
I'll post anything else i might encounter while using the patched module.
#9
highrockmedia : I have just tried to apply the path to the latest dev version and it worked.
Like this:
git clone --branch 7.x-1.x http://git.drupal.org/project/adaptive_image.gitcd adaptive_image/
wget http://drupal.org/files/style-effect-index-1371894-4.patch
git apply style-effect-index-1371894-4.patch
#10
@alexku, apparently, I ran into this bug: git apply does not work from within the local checkout of an unrelated git repository
#11
Commited, thanks!
#12
Automatically closed -- issue fixed for 2 weeks with no activity.