Skip to content

Commit

Permalink
Make possible to upload SVG logo by admin
Browse files Browse the repository at this point in the history
  • Loading branch information
cbmd committed Feb 16, 2015
1 parent 8352a97 commit 7596d39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app/code/Magento/Backend/Model/Config/Backend/Image/Logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ protected function _addWhetherScopeInfo()
{
return true;
}

/**
* Getter for allowed extensions of uploaded files.
*
* @return string[]
*/
protected function _getAllowedExtensions()
{
return ['jpg', 'jpeg', 'gif', 'png', 'svg'];
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/Theme/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<label>Header</label>
<field id="logo_src" translate="label" type="image" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Logo Image</label>
<comment>Allowed file types:PNG, GIF, JPG, JPEG.</comment>
<comment>Allowed file types:PNG, GIF, JPG, JPEG, SVG.</comment>
<backend_model>Magento\Backend\Model\Config\Backend\Image\Logo</backend_model>
<base_url type="media" scope_info="1">logo</base_url>
</field>
Expand Down

0 comments on commit 7596d39

Please sign in to comment.