XF 2.1 Xenforo 2.1.9 cannot copy and paste to hotlink images from clipboard with image attachments turned off (worked in 1.5)

MMAcomm

Active member
As described here (I have investigated the reply, that does not solve this issue)

Desribed here with much confusion in the replies about the behavior. The issue is NOT attachments. Some of us turn attachments off for space/copyright reasons:



1.5 Behavior:
Turn off image attachments.
Users can right click an image from the web and select 'copy image' and the right click and paste it into the text box. This created an instant hotlinked image preview in the rich text editor. This was very useful for skipping additional steps of copying and pasting image URLs, clicking a drop down menu, pasting the URL. Many extra steps.


2.1.9 Behavior:
Turn off image attachments.
Right click 'copy image' from the web, right click 'paste' into the text editor. Nothing happens.


Is there a fix for this?
Is there a work around to avoid the copying and pasting URL text into image menu of the text editor? This is antiquated behavior and adds steps.


Thank you.
 
Last edited:

RallyFan

Active member
Isn't that controlled/shared via: ACP > Groups and Permissions > User Group Permissions > Forum Permissions > Upload Attachments to Posts.

Same applies to v1.5.
 

MMAcomm

Active member
Isn't that controlled/shared via: ACP > Groups and Permissions > User Group Permissions > Forum Permissions > Upload Attachments to Posts.

Same applies to v1.5.

Nope.

That is the continued confusion here.
This behavior has nothing to do with attachments.
People who run attachments on their forum do not see this behavior because when you copy and paste it will simply act as a upload.

As described above, in the past if you have attachments off, you could copy an image and then paste it right into the rich text editor and the picture would appear. It was using the bbcode IMG tags to do so. it is the equivalent of copying and pasting the URL then clicking the rich text editor menu and pasting the URL in there and hitting insert. All of those steps were compressed in a single copy image and then paste in the rich text editor. NOT AS AN ATTACHMENT.

This is crucially important behavior for smaller beginning sites or anybody else that doesn't want to host images locally. With a huge numbers of image sharing sites out there, memes, etc. This workflow increased user engagement with pictures. It did so even more for an older crowd or anyone else that isn't that tech savvy trying to get a URL and do the IMG insert dance. Beyond that, it was simply much smoother and increased user participation.

Upon upgrading to 2.1 this is one of the first complaints from many of my users on my forum. I thought I had figured out everything in preparation for the migration but not this. Unfortunately it is not easy to duplicate behavior because xenforo.com community has attachments turned on so people cant see it happen.
 
Last edited:

RallyFan

Active member
Just tested here and confirmed 100% that setting is what controls the ability to copy and paste images into a message. It has been that way in v1.5 as well.

When the user pastes a file, it is uploading that image to your image proxy/attachments area of the forum (hence classed as an attachment) (even though it is kinda confusing given some may think that setting only applies to "Attach Files").

Sounds like you are referring to users hotlinking to the url of an image offsite (rather than uploading locally).

To clarify: When a user right clicks and goes "copy image" from another website.

WHAT IT DOES: Uploads the photo as an attachment hosted locally on your forum.
WHAT YOU WANT: Attach the photo in the same way Insert > Image > Paste URL does (whereby the image appears but is hotlinked elsewhere), but with a simple paste command instead.

As far as I'm aware that change is done to prevent dead image placeholders in the future (when other sites change content).

Have a play around with either:
ACP > Setup > Options > Media Embedding or
ACP > Setup > Options > Image and Link Proxy

Might be something there as those setting control media embedding and link proxying.

That said the behaviour mentioned above has been there since v1.5 days as well.
 

MMAcomm

Active member
Just tested here and confirmed 100% that setting is what controls the ability to copy and paste images into a message. It has been that way in v1.5 as well.

When the user pastes a file, it is uploading that image to your image proxy/attachments area of the forum (hence classed as an attachment) (even though it is kinda confusing given some may think that setting only applies to "Attach Files").
Again, this is the confusion and you are not following. I specifically stating you must turn off your attachment permission to see this behavior.
Turn off the ability to attach files and then try again.


Sounds like you are referring to users hotlinking to the url of an image offsite (rather than uploading locally).
Exactly. That is what I have described as above.
Nothing to do with attachments or uploading etc. Turn off that permission to see behavior.

To clarify: When a user right clicks and goes "copy image" from another website.

WHAT IT DOES: Uploads the photo as an attachment hosted locally on your forum.
WHAT YOU WANT: Attach the photo in the same way Insert > Image > Paste URL does (whereby the image appears but is hotlinked elsewhere), but with a simple paste command instead.

As far as I'm aware that change is done to prevent dead image placeholders in the future (when other sites change content).
No.
In 1.5 if you turn off attachments the standard default behavior is as you just posted.
WHAT YOU WANT: Attach the photo in the same way Insert > Image > Paste URL does (whereby the image appears but is hotlinked elsewhere), but with a simple paste command instead.
I want that to continue in 2.1 when attachments are turned off, just like before.

As far as I'm aware that change is done to prevent dead image placeholders in the future (when other sites change content).
There is no confirmation of this.
As per the links above, there is much confusion by others users when people post about this problem. Just as you think I am confused about the copy/paste upload process.
Turn off your attachment permissions in a 1.5x environment, then try it.

Have a play around with either:
ACP > Setup > Options > Media Embedding or
ACP > Setup > Options > Image and Link Proxy

Might be something there as those setting control media embedding and link proxying.
Tried. Not the issue. It's the rich text editor.

That said the behaviour mentioned above has been there since v1.5 days as well.
As above. It hasn't. I just migrated today.
 

MMAcomm

Active member
1.5 Behavior:
Turn off attachments.
Users can right click an image from the web and select 'copy image' and the right click and paste it into the text box. This created an instant hotlinked image preview in the rich text editor. This was very useful for skipping additional steps of copying and pasting image URLs, clicking a drop down menu, pasting the URL. Many extra steps.
2.1.9 Behavior:
Turn off attachments.
Right click 'copy image' from the web, right click 'paste' into the text editor. Nothing happens.
 

MMAcomm

Active member
We have one forum that is mainly seniors and they dont like change!

With 1.5 our members could copy and paste an image directly into the editor and not as an attachment.

Is this still possible with 2.1? I have tried to show them how using the Insert Image > By Url but some members just cant grasp this.

They need it as simple as it was in 1.5, copy and paste the image they want to show in their post and we want it so it is not uploaded as an attachment. Maybe a setting I have overlooked?
Has there been any resolution to this? I've used xenforo forums where I can paste an image directly into this box but I'm trying to set one up and have attachments disabled (upload space is a concern at this point) and cannot paste an image, it just blinks and does nothing.
As of 2.1.4 this is still an issue.

We have never allowed attachment uploads for both copyright and space reasons. Users used to be able to cut and paste or drag and drop an image into their post and it was embeded. Now nothing happens.
Quoting individuals that have experiences this in the other threads to avoid bumping old topics. Remains an issue and hoping to clarify as confusion continues in that problem itself. If cannot get understanding of the problem in the first place can never get a fix.
 

RallyFan

Active member
I understand the issue you are talking about (and what you are trying to achieve), and (that issue) has been around since v1.5x days (I've had experience with 1.5x for some time and seen that exact same issue you refer to). Back in the day it would happen when a user was upgraded or downgraded, and the user permissions didn't change over correctly (that permission mentioned about re uploading attachments).

I do know that earlier VBulletin worked how you described, but 1.5 had this same issue (or at least it was possible to have this same issue in some configurations).

As you mention, the user would attempt to post an image, and nothing would happen, it'd just be blank. With Upload Attachment setting disabled.

I don't have a 1.5x environment setup to test it anymore.

There is no confirmation of this.
Be stuffed if I can find it now (I'm in the process of building a forum and not far off launching), so I've read 101 thousand things of late. I do specifically recall though reading that it was by design to prevent image placeholders in historical posts. I'll try to find it.

Does Insert > Image > Paste URL work out of interest? Maybe the workaround is quicker access to that function?
 

MMAcomm

Active member
I understand the issue you are talking about (and what you are trying to achieve), and (that issue) has been around since v1.5x days (I've had experience with 1.5x for some time and seen that exact same issue you refer to). Back in the day it would happen when a user was upgraded or downgraded, and the user permissions didn't change over correctly (that permission mentioned about re uploading attachments).

I do know that earlier VBulletin worked how you described, but 1.5 had this same issue (or at least it was possible to have this same issue in some configurations).

As you mention, the user would attempt to post an image, and nothing would happen, it'd just be blank. With Upload Attachment setting disabled.

I don't have a 1.5x environment setup to test it anymore.
Again it's simply not true and you are muddying my attempts to get focus on this issue by acting like this was not previous behavior, then offering no proof of it.

I just had a 1.5 forum 3 days ago.


Here is a 1.5 forum I found on the net:
Go sign up yourself. Post a thread, copy and paste from the web directly into the editor and see an instant hotlinked picture.

You used to be able to copy and paste it became a hotlinked image. That is no longer the case.
 

MMAcomm

Active member
Froala editor has an options for this. Anyone know how to turn that flag off?

 

RallyFan

Active member
Again it's simply not true and you are muddying my attempts to get focus on this issue by acting like this was not previous behavior, then offering no proof of it.
You're missing my point.

All I'm saying is that behaviour CAN exhibit itself in v1.5, It's not something that impacts only v2.1x.

Froala editor has an options for this. Anyone know how to turn that flag off?

 

MMAcomm

Active member
I read that. I am now on a coding spree trying to learn how to respond to that advice...
I don't know JS

If you want to adjust the editor configuration though, you need to do this via JS. We fire a editor:config event. You can listen to this (at the document level) and modify the configuration that it receives as you need.
Any idea how to pass this one flag in response to his recommendation here?

imageUploadRemoteUrls: false
 

RallyFan

Active member
FWIW someone here mentioned a similar issue: https://xenforo.com/community/threads/paste-images-from-web-browser-as-bbcode-image.142856/

Not that it helps, but sounds like that link might steer you in the right direction.

I'm terrible with coding as well (I can read and understand it, but don't know syntaxes), so sorry I can't help there :(

EDIT: Possibly run a text search on something in that list of froala options that you KNOW exists in Xenforo, see how they implement that, and then copy it with the imageuploadremoteurls line?
 

MMAcomm

Active member
EDIT: Possibly run a text search on something in that list of froala options that you KNOW exists in Xenforo, see how they implement that, and then copy it with the imageuploadremoteurls line?
hey run a minified JS script by license
Can't edit anything.

Have to listen to the even and pass the flag. Hopefully a dev will read this. ONE FLAG solves my issue.
 

RallyFan

Active member
They run both minified and regular versions under /%installdirectory%/js/xf

Just reading here:
and

What if you drop that line into a file called "imageurlremoval.js", maybe like this (?). Test on a non active board of course.

Code:
new FroalaEditor('.selector', {
  imageUploadRemoteUrls: false
});
Then in Page-Container (or somewhere) call it aka

Code:
<script type="text/javascript" src="js/xf/imageurlremoval.js"></script>
or

Code:
 <xen:require js="js/xf/imageurlremoval.js" />
@AndyB might be able to clarify the correct syntax / usage here.
 

Brogan

XenForo moderator
Staff member
I spoke with the developers and that flag is only for the 'Insert image' pop up field - it doesn't apply to copying and pasting into the editor window.

As it stands, there is no way of directly allowing copied images to be embedded without using the pop up.
 

MMAcomm

Active member
I spoke with the developers and that flag is only for the 'Insert image' pop up field - it doesn't apply to copying and pasting into the editor window.

As it stands, there is no way of directly allowing copied images to be embedded without using the pop up.
Thank you for taking your time on this to give closure.
This is unfortunate and since xenforo is a large froala customer, please consider requesting this behavior in future releases. This behavior is an unexpected nicety for those not performing local uploads that makes the editor respond as intended (exactly the same as local uploads).
 

RallyFan

Active member
This behavior is an unexpected nicety for those not performing local uploads that makes the editor respond as intended (exactly the same as local uploads).
There's no harm in allowing local uploads though. Even the cheapest of hosts come with some decent storage these days (5-10GB).

It's not that the functionality you are after has been removed, it's just that it's been made harder to access with a few more button clicks. Using the "insert image" part of the editor is what Froala will refer back to if this is requested.

Far easier to allow image uploading, but if you are on a small storage plan, drop the max number of images, shorten the proxy time, and drop the size.

Then when people try to paste something in, have the "Uploaded file is too large" phrase changed to "Please use INSERT IMAGE (CTRL+P) to insert image links".

That's kinda a workaround I guess.

Short of that you could probably have it custom developed and written, but I doubt it would be cheap nor easy, given you'd have to selectively capture a paste function, determine it's an image and not text, and then redirect users to the INSERT IMAGE overlay anyway.
 

MMAcomm

Active member
There's no harm in allowing local uploads though. Even the cheapest of hosts come with some decent storage these days (5-10GB).

It's not that the functionality you are after has been removed, it's just that it's been made harder to access with a few more button clicks. Using the "insert image" part of the editor is what Froala will refer back to if this is requested.

Far easier to allow image uploading, but if you are on a small storage plan, drop the max number of images, shorten the proxy time, and drop the size.

Then when people try to paste something in, have the "Uploaded file is too large" phrase changed to "Please use INSERT IMAGE (CTRL+P) to insert image links".

That's kinda a workaround I guess.

Short of that you could probably have it custom developed and written, but I doubt it would be cheap nor easy, given you'd have to selectively capture a paste function, determine it's an image and not text, and then redirect users to the INSERT IMAGE overlay anyway.
Please stop derailing my threads.
 
Top