## 2017 Problem Authoring Workshop

### Re: HTML and images in problem files

by Davide Cervone -
Number of replies: 0
For this particular question (about images), there is also the issue of the URL for the image file. If the image is an external one (from some other website), that would make the URL easy to deal with, but would give your problem an external dependency, so it could break at any time. So we usually include the image files along with the .pg problem file. But the templates directory is not directly available to the web, so there are no URLs for the image files directly. Part of what the image() function does in WeBWorK is make the image file available in a location that is available to the web. It also handles the image properly for inclusion in the LaTeX file that is used to create the hardcopy output.

So there is more to this than just creating some HTML to include an image.