def source_filename(self, docname: str, srcdir: str):
        """ Get the full filename to referenced image """

        docpath = Path(srcdir, docname)
        parent = docpath.parent
        imgpath = parent.joinpath(self.filename)

        # Does this exist?
        if not imgpath.exists():
            msg = f'Image does not exist at "{imgpath}"'
            raise SphinxError(msg)

        return imgpath
Get the full filename to referenced image