Skip to content

Impossible to upload SVG via the webapi. #39

@thomas-kl1

Description

@thomas-kl1

It fails due to vendor/magento/framework/Api/ImageContentValidator.php:55

$imageProperties = @getimagesizefromstring($fileContent);
if (empty($imageProperties)) {
    throw new InputException(new Phrase('The image content must be valid base64 encoded data.'));
}

SVG content is not compatible with the getimagesizefromstring php function. It needs to get a specific validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions