File preview after upload
Hey everyone- We've been testing out Rocket.Chat for over a week, and it looks promising. Here's one minor issue (not really a "bug", just an "annoyance") that we've noticed, though:
When you upload a file in a channel, you get a link to it. If that file is an image (in most of our cases, it will be), it would be nice to have a preview. Also, when you click on the link, it tries to download it. Now, you can go to the 'files' list in the sidebar, click it there, and get a viewable version, but how come we can't have that in the chat stream as well?
Well, it should immediately show you the uploaded file... and when you click on it, it should actually open that just like you said it happens with the sidebar links. Let me investigate that... does that happen to you on the demo server as well?
Let me try it.
Ok, the preview works there, but clicking the link still attempts to download it.
right... if you click the link yes, but if you click on the preview, it opens up...
Ahh, ok. I didn't try that. Any idea why our install isn't generating the preview?
If the preview is not showing to you, it's probably settings-related. Go to Settings / API. Is Embed set to true?
Yes, it is.
Are you running on HTTPS? Can you check if the image links are on the same protocol? And the browser console, any errors showing there?
Both are HTTPS. No errors in the console.
When I inspect in the demo server, I see the preview in a div of the class 'inline-image'. That div isn't there on our server. But, there is a curious ::after that shows up where it should be.

We've had an issue with some people not being able to save avatars, or the avatars don't "stick". Not sure if it's related, but I wanted to mention it.
I have to call for more help :) @RocketChat/core please? can someone help out here? I'm out of ideas...
If you are running over SSL it could be a certificate issue. Was the certificate signed by a public CA? or was it an internally or self signed cert? If this is the case there is a setting under the general settings to allow self signed/invalid certificates. The checks get done on file upload so it will not back date previously uploaded images but for new images it should fix it.
That was it, thank you sir! We are using a self-signed, and that was still set to 'false'.
You rock @emcguinness !!! Thank you very much!