Joomla-cms: srcset for images needed

Created on 16 Mar 2020  Â·  20Comments  Â·  Source: joomla/joomla-cms

I find it rather urgent for Joomla 4 to have a srcset for the images...

<img src="" srcset="" alt="">
JCE editor has it already
thanks to the team

New Feature No Code Attached Yet

Most helpful comment

@Milglius No serious photographer or graphic designer in the world will automatically resize their photos with Joomla.

If you don't know this subject why answer?

We need srcset for our already resized images
And adding this code (this possibility) is not a big job.
I have my own library that creates
img (src srcset alt)
and/or
picture (source srcset media sizes) (img src alt)

Automatic image resizing is another subject that has nothing to do with this one.

All 20 comments

Is this a duplicate of #25655?

not really, I dont want my photos to be resized , just to have the ability to add the to the srcset

Le 16 mars 2020 à 12:14, Quy notifications@github.com a écrit :

Is this a duplicate of #25655 https://github.com/joomla/joomla-cms/issues/25655?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/joomla/joomla-cms/issues/28368#issuecomment-599479336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUFERAE2C6UIK5P3RS5BJLRHYC2JANCNFSM4LL77SEQ.

@no-matter-0 You need that in the editor in backend e.g. for images inserted inside articles? Or also at other places, e.g. intro image of article?

To all who might know: Is that something to be done in TinyMCE, or does TinyMCE already support it and we only don't use it?

we need it everywhere, it should be the modern way to display any img

<img src="/images/photo-1x.jpg" srcset="/images/photo-1x.jpg 1x, /images/photo-2x.jpg 2x, /images/photo-3x.jpg 3x" alt="">

of course in tinymce it would be great too , actually only JCE support it (since one year I think)

"JOOMLA!" can't natively support this, since it doesn't have a bulk image insertion, without a major rewrite of com_media. This should be looked into via a function of the editor. https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

Nowadays it is necessary img src alone is not enough
Tinymce is not a serious editor, I use Codemirror but it is not an editor at all

@richard67 @no-matter-0 What benefit is to have many 10+MB photos not able to be resized by Joomla core, but just to have the ability to add the to the srcset?

We need that in the editor in frontend e.g. for images inserted inside articles and we need it everywhereelse also.

@Milglius Please don't abuse other peoples' issues to discuss yours.

This issue here is about using SRC set.

You talk about possibility to resize pictures and save with different name on upload.

Both features can be used together of course, but they are different features.

@richard67 please dont abuse me.

My comment here is about using SRC set.

@Milglius No serious photographer or graphic designer in the world will automatically resize their photos with Joomla.

If you don't know this subject why answer?

We need srcset for our already resized images
And adding this code (this possibility) is not a big job.
I have my own library that creates
img (src srcset alt)
and/or
picture (source srcset media sizes) (img src alt)

Automatic image resizing is another subject that has nothing to do with this one.

@no-matter-0 My comment here is about what benefit using SRC set then in joomla core you have many 10+MB photos?

I doubt joomla core should be just for photographer or graphic designer who resize their photos manualy and do not use Joomla,

adding a srcset attributes is nothing to do , and as i said it is already in JCE (without resizing) since at least one year

resizing images is another subject , feel free to open it if you think it is important

thanks for your comments

@no-matter-0 how you adding a srcset in JCE (without resizing) ?

in JCE there is a possibility to add a row for each images you want to ad to the srcset, you choose your image just as you choose the one for src , and of course you can fill attributes like density (2x) or sizes (400w)

Why worry about resizing ?

@Milglius Please respect if the author of this issue tells you that in his opinion your discussion is not related to his issue, and don't force him into your discussion by posting again and again.

It could be related and certainly useful for many , but not necessary
JCE is a great editor and implements srcset without resizing

thank you for reading me

@no-matter-0 can you show us JCE printscr with that possibility - to add a row for each images you want to ad to the srcset, you choose your image just as you choose the one for src , and of course you can fill attributes like density (2x) or sizes (400w)

1) go to https://demo.joomlacontenteditor.net/ login with demo / demo
2) click any edit box in front end,
3) click on the second insert image icon (the one for responsive images)
4) go to responsive tab
5) source row with SRC W X (optional sizes attribute)
6) PLUS to add another row

easy simple and clever

JCE has now the option for images resizing but the firsts versions with srcset was without it

you can try it yourself and save and you wil get something like

<img src="/images/sampledata/dandelion.jpg" srcset="/images/sampledata/cockroach.jpg 400w/1x,images/sampledata/owl.jpg 800w/2x" alt="dandelion" width="1920" height="1151">

We need that in the editor in frontend e.g. for images inserted inside articles and we need it everywhereelse also.

has nothing to do with srcset.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

B3nito picture B3nito  Â·  5Comments

brianteeman picture brianteeman  Â·  4Comments

Didldu-Florian picture Didldu-Florian  Â·  4Comments

aDaneInSpain picture aDaneInSpain  Â·  4Comments

brianteeman picture brianteeman  Â·  5Comments