Git Product home page Git Product logo

grunt-tinypng's People

Contributors

holm avatar marrone avatar mmarronepch avatar mrhyde avatar sinled avatar stivon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

grunt-tinypng's Issues

Files are not reduced on first launch

Hello.

I'm back again with my 265 images to optimize. πŸ˜„
And I noticed that I need to run many times grunt-tinypng to optimize all this images.

First wave

Running "tinypng:compress" (tinypng) task
↑ Upload:   [||||||||||||||||||||] 100% (93/93 images)
↓ Download: [||||||||||||||||||||] 100% (93/93 images)

Skipped: 172 images, Compressed: 93 images, Savings: 21.37 KB (ratio: 0.8272)

Second wave

Running "tinypng:compress" (tinypng) task
↑ Upload:   [||||||||||||||||||||] 100% (21/21 images)
↓ Download: [||||||||||||||||||||] 100% (21/21 images)

Skipped: 244 images, Compressed: 21 images, Savings: 1.35 KB (ratio: 0.9321)

Third wave

Running "tinypng:compress" (tinypng) task
↑ Upload:   [||||||||||||||||||||] 100% (3/3 images)
↓ Download: [||||||||||||||||||||] 100% (3/3 images)

Skipped: 262 images, Compressed: 3 images, Savings: 64 bytes (ratio: 0.9785)

So, I think some files are not downloaded from tinypng correctly, or not saved... I don't know.
I can give you more informations about this if you want.

Problem with small images

If i just have 1 small image to compress the progress works well but the downloaded image was not downloaded complete. Seems that the seems didnt wait for complete?

The second attachments ist the damged file. If i upload the image directly to tinypng.com it works well.

profile-background

profile-background

.jpg with tinyjpg

Does this task process .jpg images too?
If yes, how would the compress task options look for compressing both .jpg and .png?
If not, could that be added (since the tinypng API can process .jpg)?

Error while installing

Im getting the following error while installing this plugin:

screenshot 2013-12-17 17 46 53

Any idea of what's going wrong?

Show summary on error

I can't imagine my life without your great plugin, but I have an issue I face every month when I reach my API limit :
On error, summary about optimized files doesn't appear. Is it possible to show the summary even on error ?
Thanks a lot !

Cannot read property 'setRawMode'

Hi
I am getting an error only with the pngs.

The message error is:

Running "tinypng:compress_png" (tinypng) task
Warning: Cannot read property 'setRawMode' of null Use --force to continue.

Thanks

Update sigFile during download

Hello,

First of all, thanks a lot for your wonderful tool that allows us to use a compressor far more efficient than imagemin (for png, at least).

I have an issue while downloading files, probably due to a bad error handling (I'm investigating).

But sigFile seems to be only generated after all files have been downloaded... And if an issue stop you before... You'll have to submit all files again, and use a lot of API calls for nothing.

It will be great if this file was updated after each download.

Thanks !

sigFile is ignored

Hi,

I implemented a task into a yeoman project according to your example:

    tinypng: {
      options: {
        apiKey: '...',
        checkSigs: true,
        sigFile: '<%= config.app %>/images/file_sigs.json',
        summarize: true,
        showProgress: true,
        stopOnImageError: true
      },
      compress: {
        files: [{
          expand: true,
          cwd: '<%= config.app %>/images',
          src: '{,*/}*.{gif,jpeg,jpg,png}',
          dest: '<%= config.dist %>/images'
        }]
      }
    },

Images are compressed and the sigFile is written to the provided location but it seems to be ignored on subsequent runs. All images are compressed again. Am I missing something?

Thanks in advance.

Cheers
BjΓΆrn

Compressing lots of images doesn't work

Hello,

I'm trying to compress a huge quantity if images, and tinypng seems to fails compress it.

Here's the output :

Running "tinypng:compress" (tinypng) task
↑ Upload:   [||||||||||||||||||||] 100% (220/220 images)
↓ Download:
>> problem with request: read ECONNRESET
>> problem with request: read ECONNRESET
>> problem with request: read ECONNRESET
(lot more lines liks these)
>> got error, read ECONNRESET, making request for minified image at https://api.tinypng.com/output/f
1n2dgr45oc1n41t.png
>> got error, read ECONNRESET, making request for minified image at https://api.tinypng.com/output/k
isstpfu7g21oncq.png
>> got error, read ECONNRESET, making request for minified image at https://api.tinypng.com/output/v
7cvhch14m68s6cl.png
>> got error, read ECONNRESET, making request for minified image at https://api.tinypng.com/output/f
g5fbpt1kl8q1iod.png

And then... I can't access to https://tinypng.com/ (from my computer, but my colleagues can) and grunt-tinypng says

>> problem with request: connect ETIMEDOUT

Maybe you should send request 20 by 20, to avoid this situation...

Publish version 0.7.0 on npm

For some reason last version was not published on NPM and we are only able to use v0.6.1.
Please publish v0.7.0

signatures file compression

Is there any way to make the signatures json file to be written in an uncompressed format? Currently it adds everything in one line (compressed) which makes conflicts difficult to solve.

Thanks in advance!

grunt-tinypng stops other grunt tasks from running

At first thanks for the great plugin.
I have small issue:

grunt-tinypng stops other grunt tasks when no files should be minified

I am using such options grunt-tinypng:

    tinypng:
      options:
        apiKey: 'qwerty'
        checkSigs: true
        sigFile: 'tinypng-signatures.json'

      dist:
        expand: true
        cwd: '<%= yeoman.app %>/images/lossy/original/'
        src: '{,*/}*.png'
        dest: '<%= yeoman.app %>/images/lossy/'

and when i run such build task:

  grunt.registerTask "build", [
    "clean:dist"
    "concurrent:dist"
    "uglify:dist"
    "autoprefixer:dist"
    "tinypng:dist"
    "copy"
    "imagemin"
    "svgmin"
    "cssmin"
    "notify:dist"
  ]

i recieve such output in console:

...
comparing hash of image at src/images/lossy/original/contacts-map.png
file sig matches, skipping minification of file at src/images/lossy/original/map.png

and no task running after tinypng:dist

Error blocks execution of other tasks?

I have to tasks running when watching *.png files, one is grunt-tinypng and grunt-imgo. First I use grunt-tinypng and after it finished grunt-imgo, but sometimes I get an error

Running "tinypng:compress" (tinypng) task
↑ Upload:   [                    ]   0% (1/1 image)
↓ Download:
>> got error response from api: {"error":"InputMissing","message":"File is empty"}

and no other task will run afterwards, how can I properly handle this situation?

Thank you!

Wrong "savings" value if TinyPNG fails to get a lighter file

Hi there,

Once again, thanks for your great plugin! :-)

I'm getting an issue with the saving value when the processed file is not smaller :

Running "tinypng:compress" (tinypng) task
↑ Upload:   [||||||||||||||||||||] 100% (1/1 image)
↓ Download:

Skipped: 31 images, Compressed: 1 image, Savings: 87.46 KB (ratio: 0)

There is no file downloaded, but Savings: 87.46 KB (ratio: 0).
The filesize here is 87.46 exactly.

Any ideas?
Thanks!

Can't access to tinypng.com with a proxy

I have a proxy on my server and grunt-tinypng does not work with a proxy.

I had to edit the plugin by adding an agent (with https-proxy-agent) and also modify the code for the method downloadOutputImage:

var opt = {
host: urlInfo.hostname,
path: urlInfo.pathname,
method: 'GET',
accepts: '/',
rejectUnauthorized: false,
requestCert: true,
agent: agent
};
https.get(opt, function(imageRes) {...

You can change your code to handle a proxy?

Thank you

Cannot find module 'graceful-fs'

I am getting this error all other task are working fine accept tinypng I am using windows 8.1 npm 0.12 and grunt 0.4+

Loading "tinypng.js" tasks...ERROR

Error: Cannot find module 'graceful-fs'
Warning: Task "tinypng" not found. Use --force to continue.

Aborted due to warnings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.