Last active
December 20, 2015 18:49
-
-
Save gcpantazis/6178424 to your computer and use it in GitHub Desktop.
Use ImageMagick's `identify` command to create a CLI command for evaluating images and getting a same-sized placeholder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "http://placehold.it/$(identify $1 | sed -n 's/.* \([0-9][0-9]*x[0-9][0-9]*\) .*/\1/p')" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
getPlaceholder path/to/some/image.jpgOutput:
http://placehold.it/2800x1240