public function __construct(MediaRepositoryInterface $mediaRepository, FormatCacheInterface $formatCache, ImageConverterInterface $converter, $saveImage, $responseHeaders, $formats, array $supportedMimeTypes)
{
$this->mediaRepository = $mediaRepository;
$this->formatCache = $formatCache;
$this->converter = $converter;
$this->saveImage = $saveImage == 'true' ? true : false;
$this->responseHeaders = $responseHeaders;
$this->fileSystem = new Filesystem();
$this->formats = $formats;
$this->supportedMimeTypes = $supportedMimeTypes;
}