# [dev-context] Including gif images from the web

Thu May 31 14:46:13 CEST 2012

```Hi,

On Sun, 27 May 2012, Aditya Mahajan wrote:

> Hi,
>
> Inclusion of gif images from the web does not work. For example:
>
> \starttext
> \stoptext
>
> It is a rather strange bug. In grph-inc.lua we have
>
>    local newname = file.join(newpath,newbase)
>
> Now, since the webaddress has a dot, newbase has a dot. file.addsuffix does
> not
> change the suffix if a file already has a suffix (and does not give any
> warning
> about it!). So, newname does not end with .pdf, and therefore
>
> gm convert long-path.gif long-path
>
> does not convert to pdf--the resultant file is a gif file. Hence, direct
> inclusion of that file fails.
>
> A simple fix is to change the addsuffix line to:
>
>   newbase = newbase .. "." .. newformat

This issue is fixed in the latest beta.

Thanks,