Skip to content

[5.4] Add missing SVG to images extensions#47885

Closed
artur-stepien wants to merge 1 commit into
joomla:5.4-devfrom
artur-stepien:patch-2
Closed

[5.4] Add missing SVG to images extensions#47885
artur-stepien wants to merge 1 commit into
joomla:5.4-devfrom
artur-stepien:patch-2

Conversation

@artur-stepien

Copy link
Copy Markdown
Contributor

This adds SVG to image extensions list used in \Joomla\CMS\Helper\MediaHelper::isImage. Without this you can select SVG as your banner image but it will not show up in mod_banners

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Treat SVG files as images.

Testing Instructions

  • Create a banner with SVG as image.
  • Add a mod_banners module to your website and make it display your banners

Actual result BEFORE applying this Pull Request

  • A banner with SVG image not showing up

Expected result AFTER applying this Pull Request

  • A banner with SVG image showing up

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@richard67 richard67 changed the title Add missing SVG to images extensions [5.4] Add missing SVG to images extensions Jun 5, 2026
@chmst

chmst commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

This was by purpose. https://docs.joomla.org/J4.x:Media:_Uploading_SVG_files

@brianteeman

Copy link
Copy Markdown
Contributor

beat me to it @chmst

@artur-stepien

Copy link
Copy Markdown
Contributor Author

Need to check the reason why my SVG wasn't detected as SVG. As I can see in 5.4-dev branch the mod_banners should checks for image type in two methods. The one I changed and checking mime type.

@artur-stepien artur-stepien deleted the patch-2 branch June 15, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants