Support Optional end tag

Added support for the template tag to have the same syntax as version 3.2.5 with no endthumbnail and having the geometry unquoted. The documentation was not modified as the preferred method would be to use the new syntax. If no end tag is supplied then it just sets the variable to the image url.