Bitcoin Forum

Other => Meta => Topic started by: LoyceV on February 17, 2018, 07:13:30 PM



Title: Forum feature request: set Alt-text by default for all embedded images [SOLVED]
Post by: LoyceV on February 17, 2018, 07:13:30 PM
The forum acts as a proxy for all embedded images. This is a privacy feature to disable tracking pixels (https://bitcointalk.org/index.php?topic=341146.0), but it's also slow. I've seen threads where people replied without having seen the images, thus missing valuable information.

I only thought of using alt-text today, and this works. While the image is still loading, my post can show a message about it.

Example
Code:
[img alt=Image loading...]https://bitcoin.org/img/icons/logotop.svg[/img]
Shows
https://bitcoin.org/img/icons/logotop.svg
(press Shift-reload to see it in action)

My suggestion: is it possible to set this alt-text as a default for all embedded images?


Throbber (https://bitcointalk.org/index.php?topic=2967890.msg40635418#msg40635418) test
Code:
[img]https://bitcoin.org/img/icons/logotop.svg[/img]
Shows
https://bitcoin.org/img/icons/logotop.svg


Update for (manual) further improvements to embedded images: if you set the exact image size, the post "reserves" the required space even before the image is loaded.
Example:
Code:
[img width=190 height=40 alt=Image loading...]https://bitcoin.org/img/icons/logotop.svg[/img]
Shows
https://bitcoin.org/img/icons/logotop.svg
(press Shift-reload to see it in action)


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: TheBeardedBaby on February 17, 2018, 07:28:09 PM
I do agree with the idea. I even reported one post because of a huge image was loading and I was not aware of it. With this feature it will be much easier.
I will use is this way until/if/ they implement it in the forum.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: EthanB on February 18, 2018, 03:03:01 AM
My suggestion: is it possible to set this alt-text as a default for all embedded images?

I've been using the forum for a few years and have always been interested in what I'm able to do with the codes and tags; I have never once known about the alt-text option on this forum. I've known that it was a thing elsewhere, but I have never (knowingly) seen anybody using this. The forum has had problems loading images lately, and I don't see any particular reason for this to not be the default. I threw you a merit, because you taught me something new, I agree with this 100% and I can't find a flaw with it. It would make sense to at least alert users that there is an image there, when they are on a slow connection or the forum is experiencing general slowness.

If we could get a PSA on this, that might help remedy the issue somewhat.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: LoyceV on February 18, 2018, 06:26:17 PM
and I can't find a flaw with it
I found one: my Mobile browser doesn't show the alt-text. But that's a limitation of that browser, and it still works just like it works now.

My main reason for suggesting this was that I expect it to be a small quick fix for something that can be quite useful.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: Jet Cash on February 18, 2018, 06:29:01 PM
The other alternative is to post the link to the image, and not to embed the image.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: EthanB on February 18, 2018, 07:22:04 PM
I found one: my Mobile browser doesn't show the alt-text. But that's a limitation of that browser, and it still works just like it works now.

Fair enough, I stand corrected. I suppose we could do a combination of your suggestion and what Jet is suggesting, at least temporarily. Use the alt-text and if you decide to embed your image also post the link as a footnote to the image (this way nobody will miss it for any reason); unless, of course, I am missing another fundamental flaw and stand corrected.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: Foxpup on February 19, 2018, 03:40:34 AM
and I can't find a flaw with it
I found one: my Mobile browser doesn't show the alt-text. But that's a limitation of that browser,
No, it's a choice of the browser's designers. There's no requirement that browsers display alt text while images are loading. Only if the image ultimately fails to load, or if the image is in an unsupported format, is alt text required. Of the browsers installed on my system, Firefox displays alt text while the image is loading, Konqueror doesn't, and Lynx displays alt text but doesn't load the image at all until you tell it to (making the alt text a lie in this case). In this unscientific survey, only one-third of browsers actually do what you're expecting.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: BTRIC on February 23, 2018, 09:52:48 PM
I only thought of using alt-text today, and this works. While the image is still loading, my post can show a message about it.

Thank you for pointing out this feature!  I am by no means an expert on BBcode and was struggling to find some way to handle embedded images in my announcement thread because they do seem to take a long time to load, at times, regardless of where I host them or how optimized they are.

I'm going to put this in place right now, really appreciate it!

Best regards,
Ben


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: LoyceV on February 25, 2018, 12:21:02 PM
Thank you for pointing out this feature!
You're welcome!
I like your implementation, it's the perfect way to distinguish between images. Taken from your thread (https://bitcointalk.org/index.php?topic=2710678.0) as an example of how to use this:
Code:
[center][url=https://www.btric.org][img alt=Loading BTRIC Logo...]https://i.imgur.com/bS58Aju.jpg[/img][/url][/center]
[center][url=https://www.btric.org/institute/][img alt=Loading BTRIC Institute header...]https://i.imgur.com/zpu2IvF.jpg[/img][/url][/center]
[center][url=https://www.btric.org/labs/][img alt=Loading BTRIC Labs header...]https://i.imgur.com/QSnoFsw.jpg[/img][/url][/center]
[center][url=https://www.btric.org/bfd/][img alt=Loading BFD Token fundraiser header...]https://i.imgur.com/b6kQa3R.jpg[/img][/url][/center]


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: DooMAD on March 10, 2018, 09:56:48 AM
I've been noticing this issue more recently, so I don't know if maybe the image loading is getting slower than it used to be.  I'm guessing that the more users who are online and the more people who post images, the slower it potentially gets?  If there is a way to set a default, I'm all for it.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: Cobalt9317 on March 21, 2018, 10:23:52 PM
This feature could be implemented in the new forum not in this one as it only has a BBCODE standard coding not an HTML 5.

But if I'm missing some point here let me know I think it is programmable the alt attribute in the bbcode?


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: mdayonliner on March 25, 2018, 07:38:20 AM
Code:
[img alt=Image loading...]https://bitcoin.org/img/icons/logotop.svg[/img]
My suggestion: is it possible to set this alt-text as a default for all embedded images?

It's not a big task to do so yes it's possible.

However this is what I think. Someone with little experience in the forum and if the person is aware of the issue (which they will learn as they go) then they can add this alt attribute on the tag. i.e: for URL tag, we can simply discover how to use it.

Not a big deal in my opinion.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: LoyceV on April 15, 2018, 08:53:36 AM
I saw someone use image width and height tags a few days ago (sorry, I don't remember who it was). This is worth adding, especially if you use more than one image.

Example:
Code:
[img width=190 height=40 alt=Image loading...]https://bitcoin.org/img/icons/logotop.svg[/img]
Shows
https://bitcoin.org/img/icons/logotop.svg
https://bitcoin.org/img/icons/logotop.svg

Thanks to the width and height tags in the 2 images above, this text doesn't move on Shift-reload.

https://bitcoin.org/img/icons/logotop.svg
https://bitcoin.org/img/icons/logotop.svg

Without the width and height tags in the 2 images above, this text moves on Shift-reload. Try it!


I'm not asking for this to be made a default on the forum, as it'll take more coding than just adding an alt-text.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: theymos on June 22, 2018, 04:30:56 AM
Alt text has a real semantic meaning, so I didn't want to do that, but I added a throbber background image to images without any alt text. I just added it now, so it may take a few hours before you'll be able to see it due to caching.

Does anyone notice any problems with this? In order to achieve the desired effect, I had to give all images with no alt text display:inline-block, which I think shouldn't affect layout at all, but I could be wrong.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: SFR10 on June 22, 2018, 08:13:21 AM
Does anyone notice any problems with this?
Yes, the "throbber background image" doesn't go away for "some" of the images:
- Here's an "archived page (https://archive.fo/IpjR7#selection-446.28-568.12)" with that issue.

Update:
I'll have to add some JavaScript to fix it, I suppose. In the interim you could give the images some alt text, which disables this.
Personally, I'm fine with how it looks so I think I'm going to stick with it (thank you for this addition, I really like it).


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: theymos_away on June 22, 2018, 08:26:48 AM
Yes, the "throbber background image" doesn't go away for "some" of the images:
- Here's an "archived page (https://archive.fo/IpjR7#selection-446.28-568.12)" with that issue.

I was hoping that basically no one was using images with transparency right where the throbber would go, but I guess not. I'll have to add some JavaScript to fix it, I suppose. In the interim you could give the images some alt text, which disables this.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: LoyceV on June 22, 2018, 09:16:40 AM
Alt text has a real semantic meaning, so I didn't want to do that
Thanks for following up!

My intention was to only show the default Alt-text if no custom Alt-text was set. Kinda like how the throbber is set up now.

I was hoping that basically no one was using images with transparency right where the throbber would go, but I guess not.
My Throbber test in the OP also shows a few pixels through the transparency.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: theymos on June 22, 2018, 09:52:03 AM
OK, I fixed the transparency issue. Though now the throbber won't show up if you have scripts disabled. AFAICT there's no way to do it accurately with just CSS.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: mdayonliner on June 22, 2018, 11:36:04 AM
Alt text has a real semantic meaning, so I didn't want to do that, but I added a throbber background image to images without any alt text. I just added it now, so it may take a few hours before you'll be able to see it due to caching.
I am noticing a change from last few hours before the image loads and it looks good. Great job.


Update:
Ok, seems like it's not working
It's working perfectly fine now. Confirmed feedback from my side.


Title: Re: Forum feature request: set Alt-text by default for all embedded images
Post by: TheBeardedBaby on June 22, 2018, 05:20:18 PM
Great, after a long wait this is finally resolved.
Hoping for some development on the case with the hompgraphs too... in the near/far future ;)



Title: Re: Forum feature request: set Alt-text by default for all embedded images [SOLVED]
Post by: LoyceV on June 25, 2018, 09:00:10 AM
The solution works fine, thanks theymos!
Locking thread now.