def METHOD_NAME(self, filenames):
    for filename in filenames:
        with open(filename, "rb") as file:
            try:
                image_data = file.read()
                image = Image.open(io.BytesIO(image_data))
                image.verify()
                image.close()
                base64_encoded_data = base64.b64encode(image_data)
                self.subject.subject.content = base64_encoded_data.decode("ascii")
                self.subject.width = image.width
                self.subject.height = image.height
                return
            except Exception:
                error_handler(
                    message=gettext("Unable to parse picture “{filename}”.").format(
                        filename=filename
                    )
                )