Feature Language Change PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
21 May 2026

Pull Request resolves # .

  • 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

Currently you can only select an image for the banner and it's the same, regardless of the screen size.

Testing Instructions

  • Apply patch
  • Setup a banner like this:
grafik - Setup the banner module and add it to the "sidebar-right" position - Open the frontend and resize the window

Actual result BEFORE applying this Pull Request

n/a

Expected result AFTER applying this Pull Request

Different screen sizes lead to different images using the same img tag

grafik grafik grafik grafik grafik

Additional information

See sizes documentation

I found out, that if you're in mobile testing mode, browser act differently than when resizing the window..

avatar bembelimen bembelimen - open - 21 May 2026
avatar bembelimen bembelimen - change - 21 May 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 May 2026
Category Administration com_banners Language & Strings Modules Front End
avatar bembelimen bembelimen - change - 21 May 2026
The description was changed
avatar bembelimen bembelimen - edited - 21 May 2026
avatar brianteeman
brianteeman - comment - 21 May 2026

Surely the only units that should be used for an image width are pixels and percentages and not font size related sizes such as em, rem, ch

avatar brianteeman
brianteeman - comment - 21 May 2026

in your example you have different images for each size but they dont have a specific alt description

avatar bembelimen bembelimen - change - 22 May 2026
The description was changed
avatar bembelimen bembelimen - edited - 22 May 2026
avatar bembelimen
bembelimen - comment - 22 May 2026

Thanks for looking

Surely the only units that should be used for an image width are pixels and percentages and not font size related sizes such as em, rem, ch

The units are not for the image but for the pre-calculation of how much space the image will take (I've update the first post with additional information like sizes documention)

in your example you have different images for each size but they dont have a specific alt description

I've added different images to make it more clear, that it changes, but the idea is, that this is a responsive solution, so to use the same image in different sizes.

avatar bembelimen bembelimen - change - 22 May 2026
Labels Added: Feature Language Change PR-6.2-dev
avatar brianteeman
brianteeman - comment - 22 May 2026

Thanks for looking

Surely the only units that should be used for an image width are pixels and percentages and not font size related sizes such as em, rem, ch

The units are not for the image but for the pre-calculation of how much space the image will take (I've update the first post with additional information like sizes documention)

ah ok - i see that the size is for the container size not the image size - i missed that before

in your example you have different images for each size but they dont have a specific alt description

I've added different images to make it more clear, that it changes, but the idea is, that this is a responsive solution, so to use the same image in different sizes.

As you can use a different image (even if it wasnt the intent) then they should each have their own alt description

avatar bembelimen
bembelimen - comment - 22 May 2026

As you can use a different image (even if it wasnt the intent) then they should each have their own alt description

That's not possible, it's one img tag with different srcset. If someone wants to use different images, they need to create different banners.

avatar muhme
muhme - comment - 22 May 2026

I was try to test this. By try & error I was able to set the image banners/white.png for smaller mobile and banners/shop-ad-books.jpg for larger desktop by configuring min width 400px and Container Width 50vw. But many other combination are not working. I do not understand, why a container needs to be configured and which values are to be used. Is that more confusing the users?

avatar brianteeman
brianteeman - comment - 22 May 2026

similar experience here

also it would be better if the dimensions fields were entered with the image

right now it is possible to create more images than you have sizes and more sizes than you have images

avatar bembelimen
bembelimen - comment - 23 May 2026

You're aware, that this is a html standard and it's ok, to have more images as sizes and the other way around. The srcset tells the browser which images are available and the sizes tells the browser how the site behaves. So the browser can then easily determines which images is the best fit for the current resolution.
It takes not only the image size into account but also e.g. retina display and so on.
The linked moz documentation explains is nicely, but there are many tutorials out there, too.
Took me also a while to understand, that srcset is completely independent from the sizes. It's more like a decision matrix.

avatar bembelimen
bembelimen - comment - 23 May 2026

You're aware, that this is a html standard and nothing I invented or decided how it works. It's ok, to have more images as sizes and the other way around. The srcset tells the browser which images are available and the sizes tells the browser how the site behaves. So the browser can then easily determines which images is the best fit for the current resolution.
It takes not only the image size into account but also e.g. retina display and so on.
The linked moz documentation explains is nicely, but there are many tutorials out there, too.
Took me also a while to understand, that srcset is completely independent from the sizes. It's more like a decision matrix.

avatar brianteeman
brianteeman - comment - 23 May 2026

I have setup the banner exactly as shown in the instructions and no matter what the browser size I always get the same banner image

avatar bembelimen
bembelimen - comment - 23 May 2026

Did you use the mobile inspector, there it does not work for me. I had literally to resize the whole browser.

avatar brianteeman
brianteeman - comment - 23 May 2026

I resized the browser and reloaded the page each time

avatar bembelimen bembelimen - change - 24 May 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-05-24 15:35:26
Closed_By bembelimen
avatar bembelimen bembelimen - close - 24 May 2026

Add a Comment

Login with GitHub to post a comment