-
-
Notifications
You must be signed in to change notification settings - Fork 6
File.image?
Daniel Berger edited this page May 22, 2021
·
4 revisions
The File.image? method will return a boolean to indicate whether or not the file
you've specified is an image or not.
For purposes of this library, an image is a file that is identified as a jpeg, gif, png, bmp, tiff or ico file. The implementation does a check against the first few bytes of the file as well as the file extension, though the latter can be disabled.