Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I tried to use the grunt-response-images task, I encounter few errors when I tried to configure the
src
like that:This is the error I received:
Warning: Command failed: gm identify: Unable to open file (some/path/subdirectory) [No such file or directory]. gm identify: Request did not return an image. Use --force to continue.
That's quite normal. In fact, the task try to give a directory to the image library for resizing. Logically, it is not possible to handle a directory for resizing.
I spent few hours to understand my mistake that it is mandatory to give the
src
like that:In my opinion, we should be able to not be forced to specify the file extensions. It will be more in the way that grunt handle the files.
To solve the issue, I added a check if the the current
src
path evaluated is a directory or not.I understand that in some cases, when we mix images and other file types in a directory tree, to have the extensions in the
src
is clearly a better solution but in case where we have only images, a simple notation is preferable.