Skip to content

Conversation

@hans2103
Copy link
Contributor

@hans2103 hans2103 commented Nov 7, 2025

Pull Request for no issue

Summary of Changes

This PR will add a subform to plugin media-action/crop to give you the option to configure your own aspect-ratios.
With this PR merged I am able to create a own set of aspect ratios.

Testing Instructions

  • Go To System > Plugins > Media-Action = Crop and notice the lack of options

  • Go To Content > Media ... select the three dots of an image and press "Edit". Open the dropdown at Aspect-Ratio and notice the presence of a pre-defined set of aspect-ratios

  • Apply the PR

  • npm run build:js to compile newly added js

  • Go To System > Plugins > Media-Action = Crop and notice the availability of an aspect-ratio-calculator and a subform to add / remove / edit aspect-ratio options. Add, remove and edit aspect ratios.

  • Save the changes

  • Go To Content > Media ... select the three dots of an image and press "Edit". Open the dropdown at Aspect-Ratio and notice the changed set of aspect ratios

Actual result BEFORE applying this Pull Request

Screenshot 2025-11-07 at 11 37 04 Screenshot 2025-11-07 at 11 37 31

Expected result AFTER applying this Pull Request

Screenshot 2025-11-07 at 11 36 40 Screenshot 2025-11-07 at 11 37 47

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

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-6.1-dev labels Nov 7, 2025
@laoneo
Copy link
Member

laoneo commented Nov 7, 2025

Nice, would be cool to default it with the existing values, so we can remove them when not needed.

@hans2103
Copy link
Contributor Author

hans2103 commented Nov 7, 2025

Nice, would be cool to default it with the existing values, so we can remove them when not needed.

@laoneo that has been taken care of.

default='{"aspect_ratios0":{"label":"1:1","value":"1","group":""},"aspect_ratios1":{"label":"5:4","value":"1.25","group":"landscape"},"aspect_ratios2":{"label":"4:3","value":"1.3333333333333333","group":"landscape"},"aspect_ratios3":{"label":"3:2","value":"1.5","group":"landscape"},"aspect_ratios4":{"label":"16:9","value":"1.7777777777777777","group":"landscape"},"aspect_ratios5":{"label":"4:5","value":"0.8","group":"portrait"},"aspect_ratios6":{"label":"3:4","value":"0.75","group":"portrait"},"aspect_ratios7":{"label":"2:3","value":"0.6666666666666667","group":"portrait"},"aspect_ratios8":{"label":"9:16","value":"0.5625","group":"portrait"}}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester PR-6.1-dev

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants