add support for gif mime

This commit is contained in:
SimonDanisch 2019-03-19 12:40:40 +01:00
parent d83666bed3
commit b78da20d04

View File

@ -106,6 +106,14 @@ function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
end
# Only gifs can be shown via image/gif
Base.showable(::MIME"image/gif", agif::AnimatedGif) = file_extension(agif.filename) == "gif"
function Base.show(io::IO, ::MIME"image/gif", agif::AnimatedGif)
write(io, read(agif.filename))
end
# -----------------------------------------------
function _animate(forloop::Expr, args...; callgif = false)