For Dataformats that support exporting HTML content, provide an API for
converting images within that content to something suitable for the format.
This fixes an issue with the PDF writer when it encountered a pluginfile.php
image, which it tried to request via HTTP without an active session. This
resulted in a 303 header returned by Moodle instead of the actual image,
causing an exception in the underlying TCPDF library.