Handling base64 images in the [img] tag.

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Handling base64 images in the [img] tag.

Post by Dragosvr92 »

What do you think about allowing users to post base64 images, on forums, inside the existing [img] BBCode?

The base64 images are used inside the <img> tag, same as a normal image url, you will only need to modify the way the img bbcode tag interprets the link, and let it read the base64 image also...

I know the complex images are ablout hundreds characters, and that might be a problem for some people that might not want such a thing into posts of their forums. You could probably allow a option to allow board owners if they want to allow this on their board, or if you guys dont agree with my idea of allowing users to post such images, at least, add an error that tells the user that tries to post such an image, instead of having image code in the imb tag, seen as normal text. After the person trys to preview or submit the image, clear the code inside the img tag, and show an error.

Apologizes for the long and messed up post :)
Previous user: TheKiller
Avatar on Memberlist 1.0.3

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: Handling base64 images in the [img] tag.

Post by Oleg »

This will probably not be advantageous for any images posted/uploaded by users.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Handling base64 images in the [img] tag.

Post by Dragosvr92 »

Yeah, guess that it would be annoying to post such long codes, in the post. A warning message should be added if peoples entempt to post a image.
When the post gets previeved or submitten, it should check the [img] tag's contents and if it has data:image/jpeg;base64,, it displays an error.

Maybe it would be nice to display a error if the image link you added is seen as normal text, and it doesnt load any image at all.

PS: i see that the full editor button has changed into Full Editor and preview. What version does this forums use. 3.1.0? I want it out soon =)
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Handling base64 images in the [img] tag.

Post by imkingdavid »

TheKiller wrote:PS: i see that the full editor button has changed into Full Editor and preview. What version does this forums use. 3.1.0? I want it out soon =)
Yes, that was a change made for 3.1. This forum is occasionally updated to the latest commits on the develop branch, which is 3.1.

As for this request, I'm not sure we really need it, but we can discuss it.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: Handling base64 images in the [img] tag.

Post by bantu »

I completely fail to see the point of this. Initial post does not explain why this would be useful. Please elaborate.

User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: Handling base64 images in the [img] tag.

Post by Erik Frèrejean »

bantu wrote:I completely fail to see the point of this. Initial post does not explain why this would be useful. Please elaborate.
^ that,
sounds like a very specific feature which only will be used by a very limited amount of users. Therefore such a thing would be far better off being an extension than a core feature.
Available on .com
Support Toolkit developer

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Handling base64 images in the [img] tag.

Post by Dragosvr92 »

Initially, i was suggesting that you allow base64 images to be posted, but then i thought that the image code is too long.
If someone ever tries to post such a code inside the [img] tag, the code and the [img] tag should be removed, and display an error message, saying that they cant post the images.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

exussum
Registered User
Posts: 1
Joined: Wed Jun 27, 2012 7:13 pm

Re: Handling base64 images in the [img] tag.

Post by exussum »

Erik Frèrejean wrote:
bantu wrote:I completely fail to see the point of this. Initial post does not explain why this would be useful. Please elaborate.
^ that,
sounds like a very specific feature which only will be used by a very limited amount of users. Therefore such a thing would be far better off being an extension than a core feature.
I would use it, It annoys me that there are alot of tutorials / posts in general with images like "removed from host" or "too many hits today" or just a 404 giving a bad image.

base64 would allow people to post images without the need of an image host

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: Handling base64 images in the [img] tag.

Post by Oleg »

The board would still have to host said images. If you want to attach an image to a post there is already a facility for that.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: Handling base64 images in the [img] tag.

Post by Dragosvr92 »

TheKiller wrote:If someone ever tries to post such a code inside the [img] tag, the code and the [img] tag should be removed, and display an error message, saying that they cant post the images.
Can we add an error message ?
Previous user: TheKiller
Avatar on Memberlist 1.0.3

Post Reply