Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow embedding images from giphy #4888

Closed
niklasf opened this Issue Feb 12, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@niklasf
Copy link
Collaborator

niklasf commented Feb 12, 2019

No description provided.

@ornicar

This comment has been minimized.

Copy link
Owner

ornicar commented Feb 17, 2019

note for implementer

}
"detect imgur image URL" in {
val url = "https://imgur.com/NXy19Im"
val picUrl = "https://i.imgur.com/NXy19Im.jpg"
addLinks(s"""img to $url here""") must_==
s"""img to <img class="embed" src="$picUrl" alt="$url"/> here"""
}
"ignore imgur image URL in quotes" in {
val url = "http://i.imgur.com/Cku31nh.png"
addLinks(s"""img to "$url" here""") must_==
s"""img to &quot;<a rel="nofollow" href="$url" target="_blank">$url</a>&quot; here"""
}
"ignore imgur gallery URL" in {
val url = "http://imgur.com/gallery/pMtTE"
addLinks(s"""link to $url here""") must_==
s"""link to <a rel="nofollow" href="$url" target="_blank">$url</a> here"""
}

@tomasbruckner

This comment has been minimized.

Copy link

tomasbruckner commented Feb 22, 2019

Emebedding where? To forum or chat or somewhere else? How is this suppose to work, should I just paste link and it should autoplay the gif?

@niklasf

This comment has been minimized.

Copy link
Collaborator Author

niklasf commented Feb 22, 2019

Yes. Currently the forums, message inbox and profile description will convert imgur URLs to embedded images. This is checked in the testcase above, and it could be extended to other "somewhat-trusted" image hosts, such as Giphy.

@ThomasKluiters

This comment has been minimized.

Copy link
Contributor

ThomasKluiters commented Mar 31, 2019

Pull request #4955 should implement this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.