Skip to content

Conversation

@AdarshSantoria
Copy link
Contributor

Pull Request for Issue #45196

Summary of Changes

This pull request enhances the mod_random_image module by allowing the use of multiple image file extensions in the Image Type parameter. Previously, the module only supported a single extension like jpg. With this change, users can input comma-separated values (e.g., jpg,jpeg,png) to support multiple file types simultaneously.

Testing Instructions

  1. Prepare a folder with images of various formats such as .jpg, .jpeg, .png, and .webp.
  2. Create or edit a Random Image module and set the image folder to the one prepared above.
  3. In the Image Type field, enter values like jpg,jpeg,png, or even uppercase like PNG.
  4. Save the module and check the frontend display.
  5. Images with all the listed extensions should now appear randomly.
    Screenshot (13)
    Screenshot (14)

Actual result BEFORE applying this Pull Request

Only images with the exact extension specified (e.g., only jpg) were displayed.
Entering multiple extensions resulted in "No images" being shown.
Screenshot (15)

Expected result AFTER applying this Pull Request

The module correctly loads and displays images of any extension listed in the comma-separated input (e.g., jpg,jpeg,png).
Screenshot (12)

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@AdarshSantoria
Copy link
Contributor Author

Hi @seaoffate-net, Can you please test it.

@bembelimen
Copy link
Contributor

I like the idea behind it. As Joomla! 5.3 is in feature freeze mode, I move it to 5.4, so it can be tested there.

@bembelimen bembelimen changed the base branch from 5.3-dev to 5.4-dev March 25, 2025 22:25
@bembelimen bembelimen changed the title [5.3] Enable support for multiple image extensions in Random Image module [5.4] Enable support for multiple image extensions in Random Image module Mar 25, 2025
@brianteeman
Copy link
Contributor

I like the idea behind it. As Joomla! 5.3 is in feature freeze mode, I move it to 5.4, so it can be tested there.

shouldnt that be 6.0? When @HLeithner did the big rebase the other week all unmerged features were moved to 6

@HLeithner HLeithner changed the base branch from 5.4-dev to 6.0-dev March 26, 2025 08:01
@HLeithner HLeithner requested a review from rdeutz as a code owner March 26, 2025 08:01
@HLeithner HLeithner changed the title [5.4] Enable support for multiple image extensions in Random Image module [6.0] Enable support for multiple image extensions in Random Image module Mar 26, 2025
@HLeithner
Copy link
Member

Rebased on 6.0

@AdarshSantoria
Copy link
Contributor Author

Hi @seaoffate-net, Can you please test it.

@AdarshSantoria
Copy link
Contributor Author

I think this is a useful enhancement for Joomla and would improve flexibility for module users.
Would appreciate it if someone could review or test when possible. Thanks! 🙏

@seaoffate-net
Copy link

seaoffate-net commented Apr 21, 2025 via email

@AdarshSantoria
Copy link
Contributor Author

AdarshSantoria commented Apr 21, 2025

Hi @seaoffate-net, is the issue related to my changes? If yes, can you please attach images directly as your link requires login. Moreover, I think this is a good feature enhancement to add.

@exlemor exlemor removed this from PR Cleanup May 10, 2025
@ceford
Copy link
Contributor

ceford commented May 30, 2025

I have tested this item ✅ successfully on 170f8ee

A thought: would this work with SVG?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45200.

@joomla-cms-bot joomla-cms-bot removed Unit/System Tests Composer Dependency Changed NPM Resource Changed This Pull Request can't be tested by Patchtester labels Jun 7, 2025
@richard67
Copy link
Member

@ceford Could you repeat your test for this PR? When you had tested it, it had conflicts from a previous rebase. I just want to be sure it still works. It has to be tested on 6.0, e.g. a 6.0 nightly or with the patched package created for this PR by Drone. Thanks in advance.

@ceford
Copy link
Contributor

ceford commented Jun 7, 2025

I have tested this item ✅ successfully on e799d18

Confirmed using a new clone with Multilingual and Sample data installed. Random images included jpg, webp, png and bmp.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45200.

@exlemor
Copy link

exlemor commented Jun 7, 2025

I have tested this item ✅ successfully on e799d18

I have successfully tested this PR. Thanks @AdarshSantoria!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45200.

@richard67 richard67 added Unit/System Tests Composer Dependency Changed NPM Resource Changed This Pull Request can't be tested by Patchtester labels Jun 7, 2025
@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45200.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 7, 2025
@richard67 richard67 removed Unit/System Tests Composer Dependency Changed NPM Resource Changed This Pull Request can't be tested by Patchtester labels Jun 7, 2025
@Bodge-IT Bodge-IT merged commit a873747 into joomla:6.0-dev Jun 12, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 12, 2025
@Bodge-IT
Copy link
Contributor

Thanks for the change @AdarshSantoria and thanks to @exlemor, @ceford for persistent testing.

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.