Fastimage Build StatusHex VersionHex docs

Description

Fastimage finds the dimensions/size or file type of a remote or local image file given the file path or uri respectively. It streams the smallest amount of data necessary to ascertain the file size. This aspect is useful when getting the file size for very large images.

Features

Examples

Fastimage.type("https://raw.githubusercontent.com/stephenmoloney/fastimage/master/priv/test.jpg")
# => "jpeg"
Fastimage.size("https://raw.githubusercontent.com/stephenmoloney/fastimage/master/priv/test.jpg")
# => %{height: 142, width: 283}

Installation

Add fastimage to your list of dependencies in mix.exs:

def deps do
  [{:fastimage, "~> 0.0.5"}]
end

Ensure fastimage is started before your application:

def application do
  [applications: [:fastimage]]
end

Tests

mix test

Credit/Acknowledgements

Licence

MIT Licence