Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Rework Image Optimization #169

Open
roblarsen opened this issue Jul 10, 2013 · 15 comments
Open

Rework Image Optimization #169

roblarsen opened this issue Jul 10, 2013 · 15 comments
Assignees

Comments

@roblarsen
Copy link
Member

This is a placeholder for any work I'll do on the image optimization tasks. There's a new branch for that work. I'll pull in the bugs and any other changes here in order to have one place to track the problems.

@ghost ghost assigned roblarsen Jul 11, 2013
@roblarsen
Copy link
Member Author

Many issues related to this:

#168 Image Optimization
#163 Image Optimization Broken on Linux/Mac
#147 OptiPNG with unix
#141 You have optipng installed and your version is: usage: grep (Mac OS Lion Mountain)
#156 Image optimization in subfolders
#37 Include pngquant in image optimization process
#149 - fix optipng version regex
#152 fix jpegtran metadata stripping

@kevinSuttle
Copy link

Big +1. I installed the required dependencies, put them on my $PATH, verified with which and they never get picked up by the build script.

@roblarsen
Copy link
Member Author

I'm actually working on it right now. I'm going to stop doing all the magic stuff and just make people be a bit more responsible for configuring the image tasks. A lot of the issues we experienced with this stuff was with trying to get too cute.

roblarsen added a commit that referenced this issue Aug 7, 2013
@roblarsen
Copy link
Member Author

@roblarsen
Copy link
Member Author

The biggest difference is that you need to manually set your version of optipng. Right now the assumption is that it's greater than 7.0. If it's not you have to uncomment line 189 in project properties

https://github.com/h5bp/ant-build-script/blob/new-image-optimization/config/project.properties#L189

@roblarsen
Copy link
Member Author

Reworked again, based on some feedback. Tested on an unprimed Quantal Quetzal server install. With no dependencies the "tool not installed, yadda yadda" messages work. With Optipng and Jpegtran installed, the images are processed.

@kevinSuttle
Copy link

Thanks Rob!

@roblarsen
Copy link
Member Author

@kevinSuttle have you had a chance to test it? I'm gathering as much feedback as I can before releasing this. It's hard to test these things since I would need about 40 systems.

@kevinSuttle
Copy link

I haven't yet. I will play with it over the weekend though. Thanks!

@almeric
Copy link

almeric commented Oct 10, 2013

Just tested the new image-optimization branch under osx 10.8 and it looks like advpng is never called because it's never set to available.
If I'm correct, this needs to be added (line 1141 build.xml):

<else>
    <var name="advpng.available" value="true"/>
</else>

@roblarsen
Copy link
Member Author

did it work when you tried that out?

@almeric
Copy link

almeric commented Oct 10, 2013

Did some more checks (with the mentioned change):
brew uninstall advancecomp
ant minify
Gives me the "advpng NOT INSTALLED. SKIPPING OPTIMIZATION OF PNGs." warning (as expected)

brew install advancecomp
ant minify
gives me the "echo Now, we run advpng on the .png files..." message

Without the change mentioned above I would always get the advpng not installed message

@roblarsen
Copy link
Member Author

Awesome. I'll add that in right now.

@gistdg
Copy link

gistdg commented Oct 19, 2013

For jpegtran (line 1213 build.xml) set value to true

<then>
    <var name="jpegtran.available" value="true"/>
</then>

@roblarsen
Copy link
Member Author

Can you elaborate? That would make it always true.

<if>
          <not>
            <available file="jpegtran" filepath="${ENV.PATH}"/>
          </not>

          <then>
            <var name="jpegtran.available" value="false"/>
          </then>
          <else>
            <var name="jpegtran.available" value="true"/>
          </else>  
        </if>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants