Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It goes here!
Comment | File | Size | Author |
---|---|---|---|
#14 | 0001-Issue-937990-by-steeroy-Port-to-Drupal-7.patch | 12.38 KB | jcisio |
#13 | imageapi_optimize-7.x.tar_.gz | 3.33 KB | siharris |
Comments
Comment #1
jerrac CreditAttribution: jerrac commentedIs a port being worked on?
Comment #2
jcisio CreditAttribution: jcisio commentedNot yet.
Comment #3
jcisio CreditAttribution: jcisio commentedI hope I'll start working on it this weekend. FYI ImageAPI in D7 http://api.drupal.org/api/drupal/includes--image.inc/group/image/7
Comment #4
jerrac CreditAttribution: jerrac commentedYeah, the image api in D7 is pretty good. But what I'm looking for is something like saving the image at 60% quality in jpg or png format. Which is what I think this module does... As in a really simple version of Photoshop's Save for Web options. The core api doesn't have that, just crop, resize, and that kind of thing. Which isn't quite enough.
Comment #5
jcisio CreditAttribution: jcisio commentedI didn't say that D7 had any functionality that this module provided, neither ;) That link is for changes in D7 core and ImageAPI D7 so that I can track down and port ImageAPI Optimize.
Comment #6
jerrac CreditAttribution: jerrac commentedheh, ok.
Comment #7
jcisio CreditAttribution: jcisio commentedFinally I won't have time this weekend :(
Comment #8
jcisio CreditAttribution: jcisio commentedFYI the ImageAPI module could be deprecated by #1028876: Future of ImageMagick toolkit. Of course ImageAPI D7 won't be dependant on ImageAPI D7, but only D7 core.
Comment #9
jerrac CreditAttribution: jerrac commentedInteresting. Would it be possible to rewrite this module to only depend on D7 core? I didn't see any indication that there are plans to add optimization functionality to ImageMagick or ImageCache actions. 'Course, I just may not have found the right issue yet. :D
Comment #10
jcisio CreditAttribution: jcisio commentedThis module depends only on D7 core and is independant on any toolkit (GD, Imagemagick or anything else).
Comment #11
jerrac CreditAttribution: jerrac commentedah, my bad.
Comment #12
threading_signals CreditAttribution: threading_signals commentedBump.
Wondering how the port is going.
Comment #13
siharris CreditAttribution: siharris commentedI wrote a port as I needed this for my site. Files attached.
Should this be renamed as it doesn't use ImageAPI?
Comment #14
jcisio CreditAttribution: jcisio commentedConvert it to a patch so that others can review. And a big thanks. For this moment, I'll keep the name.
Comment #15
Fidelix CreditAttribution: Fidelix commentedSubscribing...
Comment #16
threading_signals CreditAttribution: threading_signals commentedI enabled this module and compiled everything except for jfifremove, which "strip the optional JFIF header segment from JPEG" files. I think that one is the only one that removes metadata.
A number of questions.
1. Does any of the other tools remove metadata aside from jfifremove?
2. Once this module is enabled, does it optimize the image automatically? For example, I have a png logo that isn't optimized, and upon enabling the module and then visiting the frontpage which has the logo, that page is optimized and there is no going back? I checked and none of my pictures seems to require optimization according to pagespeed, yslow...
3. Here are the nginx folder configs for static assets (from perusio at github):
## If accessing an image generated by imagecache, serve it directly if
## available, if not relay the request to Drupal to (re)generate the
## image.
location ~* /imagecache/ {
access_log off;
expires 30d;
try_files $uri /index.php?q=$uri&$args;
}
## Drupal 7 generated image handling, i.e., imagecache in core. See:
## https://drupal.org/node/371374.
location ~* /files/styles/ {
access_log off;
expires 30d;
try_files $uri /index.php?q=$uri&$args;
}
## All static files will be served directly.
location ~* ^.+\.(?:css|js|jpg|jpeg|gif|ico|png|html|xml)$ {
access_log off;
expires 30d;
## No need to bleed constant updates. Send the all shebang in one
## fell swoop.
tcp_nodelay off;
}
I have a module called Gallery Formatter enabled (drupal.org/project/galleryformatter) which requires javascript. ImageAPI optimize seems to be based on D6 folder paths...? If I disable ImageAPI, then the pictures show up correctly. Please advise or correct the javascript or folder issues connected with this module.
Other than those three issues, I think the author's module does a great job at preparing assets for distribution by saving bandwidth, thank you.
Comment #17
jcisio CreditAttribution: jcisio commented@vividgates: were you testing the patch and reporting issue in the D7 version?
As I don't have a "real" D7 site, I keep this issue open until there are a few users test and review it.
Comment #18
threading_signals CreditAttribution: threading_signals commentedI'm using the d7 version of the module. I d/led the patch from #14 and got this:
patching file imageapi_optimize.info
Reversed (or previously applied) patch detected! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file imageapi_optimize.info.rej
patching file imageapi_optimize.install
Reversed (or previously applied) patch detected! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file imageapi_optimize.install.rej
patching file imageapi_optimize.module
After examining the patch, it appears that the d7 version from March has the patch incorporated already.
Thanks kindly for this module. Please also comment on the last three questions once you have the time, thanks again.
Sincerely,
Paul
Comment #19
jcisio CreditAttribution: jcisio commentedOoops, I committed that patch for easy review, and I completely forgot about it. Ok now we have a D7 version and about 20 users using it, I close this issue.
Comment #20
threading_signals CreditAttribution: threading_signals commentedOk, thanks. Disregard #1-3, it was a misconfiguration on my part and the other questions I have the answers to.