Skip to content

jpgmin with quality does not overwrite files if dest matches src #55

@ilovett

Description

@ilovett

If the src matches the dest:

jpgmin : {
    quality : 30,
    src : ['tmp/**/*.jpg'],
    dest : 'tmp',
}

Then the quality doesn't seem to make a difference:

Running "jpgmin" task
>> Compressed 1 files
>> Uncompressed size: 2577.7kb, Compressed size: 2461.01kb, Savings: 4.53%

However if I change the dest directory:

jpgmin : {
    quality : 30,
    src : ['tmp/**/*.jpg'],
    dest : 'other',
}

Then here is the output:

Running "jpgmin" task
>> Compressed 1 files
>> Uncompressed size: 2577.7kb, Compressed size: 85.65kb, Savings: 96.68%

This compresses, however the file is written to: other/img/filename.jpg ... I would like to be able to overwrite the file as this is a step in a chain of modifications to the image...

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions