<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://ducamp.me/index.php?action=history&amp;feed=atom&amp;title=Link-preview</id>
	<title>Link-preview - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://ducamp.me/index.php?action=history&amp;feed=atom&amp;title=Link-preview"/>
	<link rel="alternate" type="text/html" href="https://ducamp.me/index.php?title=Link-preview&amp;action=history"/>
	<updated>2026-05-13T03:16:54Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://ducamp.me/index.php?title=Link-preview&amp;diff=8840&amp;oldid=prev</id>
		<title>Xtof : Page créée avec « {{stub}}  Une &#039;&#039;&#039;&lt;dfn&gt;prévisualisation de lien&lt;/dfn&gt;&#039;&#039;&#039; est ce que les articles présentent à propos d&#039;un ou plusieurs liens embarqués, par ex. une en-tête, une image,... »</title>
		<link rel="alternate" type="text/html" href="https://ducamp.me/index.php?title=Link-preview&amp;diff=8840&amp;oldid=prev"/>
		<updated>2018-04-05T03:59:17Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « {{stub}}  Une &amp;#039;&amp;#039;&amp;#039;&amp;lt;dfn&amp;gt;prévisualisation de lien&amp;lt;/dfn&amp;gt;&amp;#039;&amp;#039;&amp;#039; est ce que les articles présentent à propos d&amp;#039;un ou plusieurs liens embarqués, par ex. une en-tête, une image,... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Une &amp;#039;&amp;#039;&amp;#039;&amp;lt;dfn&amp;gt;prévisualisation de lien&amp;lt;/dfn&amp;gt;&amp;#039;&amp;#039;&amp;#039; est ce que les articles présentent à propos d&amp;#039;un ou plusieurs liens embarqués, par ex. une en-tête, une image, un résumé provenant du lien de destination. &lt;br /&gt;
&lt;br /&gt;
== Pourquoi ==&lt;br /&gt;
Envisagez d&amp;#039;afficher une prévisualisation de lien afin que votre lecteur ait quelque attente de ce qu&amp;#039;il recevra quand il cliquera sur un lien.&lt;br /&gt;
&lt;br /&gt;
== Comment ==&lt;br /&gt;
=== Comment publier ===&lt;br /&gt;
By using an [[auto-embed]] function (like the [[CASSIS]] &amp;quot;auto_link&amp;quot; (not a typo) function), you can provide inline embedded images and videos in your plain text notes that have links.&lt;br /&gt;
&lt;br /&gt;
If you do the usual mark-up your posts with [[h-entry]], specifically:&lt;br /&gt;
* &amp;lt;code&amp;gt;p-name&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;quot;p-author [[h-card]]&amp;quot;&amp;lt;/code&amp;gt; (with at least &amp;lt;code&amp;gt;p-name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;u-url&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;u-photo&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;u-featured&amp;lt;/code&amp;gt; (if any)&lt;br /&gt;
And for [[photo]] posts, the usual:&lt;br /&gt;
* &amp;lt;code&amp;gt;u-photo&amp;lt;/code&amp;gt;&lt;br /&gt;
Then link-preview parsers will be able to use those to generate link previews of your posts.&lt;br /&gt;
&lt;br /&gt;
See also: http://microformats.org/wiki/link-preview-brainstorming#publishing&lt;br /&gt;
&lt;br /&gt;
=== How to parse ===&lt;br /&gt;
To parse a link for information to show in its link-preview, do the usual&lt;br /&gt;
* parse for an [[h-entry]]&lt;br /&gt;
Then get the following information from the following microformats parsed properties:&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;summary&amp;lt;/code&amp;gt; (if any), otherwise, text-only value of &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;, elided as necessary&lt;br /&gt;
* &amp;lt;code&amp;gt;author&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;photo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;url&amp;lt;/code&amp;gt;)&lt;br /&gt;
* image&lt;br /&gt;
** from &amp;lt;code&amp;gt;featured&amp;lt;/code&amp;gt; if any&lt;br /&gt;
** else &amp;lt;code&amp;gt;photo&amp;lt;/code&amp;gt; if any&lt;br /&gt;
&lt;br /&gt;
See also: http://microformats.org/wiki/link-preview-brainstorming#parsing&lt;br /&gt;
&lt;br /&gt;
== approches indieweb  ==&lt;br /&gt;
A few indieweb sites are figuring out how to better support embedding:&lt;br /&gt;
* [[User:Tantek.com|Tantek]]:  I&amp;#039;m thinking of improving the posting UI on my site, so that when I&amp;#039;m previewing a post before PuSHing and syndicating it out, the post preview UI retrieves the link preview(s) on the server, and then shows them to me as part of the overall post preview before I hit the &amp;quot;Publish&amp;quot; button. When I hit the &amp;quot;Publish&amp;quot; button, the same logic which makes a syndicated copy to Twitter (by calling the Twitter API), and then saves the Twitter copy permalink in my data store, can also save the link preview(s) in the same data store accordingly. just piggybacking the same data store write to file call.&lt;br /&gt;
* This is similar to another thing I’ve had on my implementation list for a while, which is a better quoting UI. Specifically, my posting UI detects URIs in my content, loads up previews, allows me to D&amp;amp;D in for link previews, perhaps load the content and allow me to select, D&amp;amp;D for quotations --[[User:Waterpigs.co.uk|Waterpigs.co.uk]] 13:23, 7 March 2013 (PST)&lt;br /&gt;
* {{kevinmarks}} built a [http://pageaspreview.herokuapp.com utopian idea] that iframes the site itself as a preview, relying on it using responsive design&lt;br /&gt;
* {{martymcguire}} experimented with replacing bare URLs in the content of posts with an [[h-cite]] containing their link preview.&lt;br /&gt;
** [https://martymcgui.re/2017/06/13/152026/ Example post]([https://web.archive.org/web/20170618001657/https://martymcgui.re/2017/06/13/152026/ archive.org version])&lt;br /&gt;
** However, content within the h-cite would show up in subsequent link-previews of this post. [https://chat.indieweb.org/dev/2017-06-17/1497742260646000 IRC Example]&lt;br /&gt;
** For now, moved link-previews outside of &amp;lt;code&amp;gt;p-name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;e-content&amp;lt;/code&amp;gt;. In markup terms, this means that a link-preview appears after the content that refers to it, and the original URL remains in place (converted to a clickable URL). This is similar to Twitter&amp;#039;s link-previews.&lt;br /&gt;
&lt;br /&gt;
== Exemples dans les silos ==&lt;br /&gt;
Various &amp;lt;span id=&amp;quot;existing silo support&amp;quot;&amp;gt;social network silos&amp;lt;/span&amp;gt; (e.g. Facebook, Twitter, Google+) show link previews underneath notes and comments that have one or more URLs, by extracting information from those URLs content and showing a title/summary/photo for those URLs underneath the posted note/comment.&lt;br /&gt;
=== Facebook ===&lt;br /&gt;
[[Facebook]] utilise [[OGP]] à partir du &amp;lt;em&amp;gt;premier&amp;lt;/em&amp;gt; lien dans un post, c&amp;#039;est-à-dire : [https://www.facebook.com/tantek.celik/posts/10101317488329623]&lt;br /&gt;
* Supporte l&amp;#039;affichage d&amp;#039;une prévisualisation de lien d&amp;#039;un lien tweet y compris le texte du tweet et l&amp;#039;image dans le tweet s&amp;#039;il y en a, par ex. avec une image : [https://www.facebook.com/tantek.celik/posts/10101317397351943]&lt;br /&gt;
&lt;br /&gt;
Facebook a un certain nombre de guidelines concernant les images dans sa documentation : &lt;br /&gt;
* https://developers.facebook.com/docs/sharing/best-practices#images&lt;br /&gt;
&lt;br /&gt;
They show different link-preview layouts for images of different resolutions!&lt;br /&gt;
* Large ( &amp;gt; 600x315px - both dimensions? &amp;gt; 1200 x 630 preferred &amp;quot;for the best display on high resolution devices&amp;quot;)&lt;br /&gt;
** image is shown above text from link preview&lt;br /&gt;
* Small ( &amp;lt; 600x315px - either dimension? but &amp;gt; 200x200px both dimensions?)&lt;br /&gt;
**  image is shown next to text from link preview&lt;br /&gt;
* None ( &amp;lt; 200x200px - either dimension? )&lt;br /&gt;
** no image preview possibly?&lt;br /&gt;
&lt;br /&gt;
There are third-party guidelines that does not follow Facebook&amp;#039;s own though:&lt;br /&gt;
&lt;br /&gt;
* AddThis: http://support.addthis.com/customer/portal/articles/1399895-adding-open-graph-tags-using-blogger Suggest including Blogger-thumbnail as image, which by default is 72x72px.&lt;br /&gt;
&lt;br /&gt;
=== Google+ ===&lt;br /&gt;
[[Google+]] uses an assortment of [[microformats]]/meta/schema/[[OGP]]+&lt;br /&gt;
&lt;br /&gt;
=== Pinterest ===&lt;br /&gt;
[[File:pinterest_link_preview.png|200px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
[[Pinterest]] uses [[OGP]], [[Microformats]], and Schema.org for their &amp;quot;[https://developers.pinterest.com/rich_pins_overview/ Rich Pins]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Twitter ===&lt;br /&gt;
[[Twitter]] uses their own white-list-domain limited meta + [[OGP]] AKA &amp;quot;[[Twitter Cards]]&amp;quot; on the &amp;lt;em&amp;gt;last&amp;lt;/em&amp;gt; link in a tweet, e.g.: [https://twitter.com/t/status/520773727370633217]&lt;br /&gt;
&lt;br /&gt;
As of (2015?) Twitter *does* support showing a link-preview of a tweet link, e.g. https://twitter.com/t/status/520758106838818816 (they previously didn&amp;#039;t)&lt;br /&gt;
&lt;br /&gt;
However, Twitter fails to show a link-preview for many links, resulting in odd link-only cross-posts from Facebook, where presumably the author did see a link-preview (because Facebook looks at far more information for the link-preview than Twitter does)&lt;br /&gt;
&lt;br /&gt;
[https://www.rmendes.net/2016/protip-dont-connect-your-twitter-account-to-facebook-or-your &amp;lt;img src=&amp;quot;https://www.rmendes.net/file/7c3da11a1c4e0494ec0cc30c8315aecc&amp;quot; alt=&amp;quot;&amp;quot; style=&amp;quot;max-width:100%&amp;quot;/&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Slack ===&lt;br /&gt;
They call creating link previews “[https://api.slack.com/docs/unfurling unfurling]” a URL.  They support [[oEmbed]] and [[OGP]] (including twitter extensions), as documented in [https://medium.com/slack-developer-blog/everything-you-ever-wanted-to-know-about-unfurling-but-were-afraid-to-ask-or-how-to-make-your-e64b4bb9254 this blog post].&lt;br /&gt;
&lt;br /&gt;
=== ... ===&lt;br /&gt;
* ... who&amp;#039;s next to make up their own site-specific link preview markup convention?&lt;br /&gt;
&lt;br /&gt;
== other link preview standards ==&lt;br /&gt;
There have been a couple of open standards created explicitly for information for link previews.&lt;br /&gt;
* [[oEmbed]] - since 2009. However it requires an extra endpoint (URL, different language(s) etc.)&lt;br /&gt;
* [[OGP]] - far more well established since it works in HTML, and [[Facebook]] immediately shows results using it.&lt;br /&gt;
&lt;br /&gt;
See http://microformats.org/wiki/link-preview-formats for more prior art research.&lt;br /&gt;
&lt;br /&gt;
== simple link preview standard ==&lt;br /&gt;
[[h-entry]] is a useful building block for this. E.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;body class=&amp;quot;h-entry&amp;quot;&amp;gt;&amp;lt;/code&amp;gt; is a good simple baseline way to markup data for link previews.&lt;br /&gt;
&lt;br /&gt;
For more details towards the development of a simple link preview standard, see: &lt;br /&gt;
* http://microformats.org/wiki/link-preview-brainstorming&lt;br /&gt;
&lt;br /&gt;
== brainstorming ==&lt;br /&gt;
=== featured image ===&lt;br /&gt;
Beyond h-entry&amp;#039;s existing properties, there may be a need for additional properties to satisfy the same use-cases as documented by the &amp;quot;existing silo support&amp;quot; above.&lt;br /&gt;
&lt;br /&gt;
E.g. most commonly, a thumbnail image to put next to a post, or rather as a publisher to provide a thumbnail / representative / featured image for others to display as part of a link-preview.&lt;br /&gt;
&lt;br /&gt;
[[WordPress]] has good prior art here:&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Post_Thumbnails: &amp;lt;blockquote&amp;gt;Post Thumbnail, &amp;#039;&amp;#039;&amp;#039;now Featured Image&amp;#039;&amp;#039;&amp;#039;, is an image that is chosen as the &amp;#039;&amp;#039;representative image&amp;#039;&amp;#039; for Posts, Pages or Custom Post Types. The display of this image is up to the theme. This is especially &amp;#039;&amp;#039;useful for &amp;quot;magazine-style&amp;quot;&amp;#039;&amp;#039; themes where each post has an image. &amp;lt;/blockquote&amp;gt; &amp;#039;&amp;#039;&amp;#039;Emphasis&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;emphasis&amp;#039;&amp;#039; added.&lt;br /&gt;
&lt;br /&gt;
=== u-featured ===&lt;br /&gt;
Thus we can learn from the WordPress&amp;#039;s experience and go with their naming of &amp;quot;Featured Image&amp;quot; - although we can simplify that - why limit to an image when some may (and do!) want to feature a video, or an audio playback stream, etc. as demonstrated by the variety of [[Twitter Cards]]?&lt;br /&gt;
&lt;br /&gt;
Thus we can introduce a &amp;quot;featured&amp;quot; property for this use-case, expected to be used as a &amp;quot;u-featured&amp;quot; property inside an h-entry that is a URL to the asset to feature for that post. Handling of different types is up to the link-preview displaying client. E.g. it could do different things based on &amp;lt;code&amp;gt;Content-Type&amp;lt;/code&amp;gt; of the URL when requested, or check its file extension (e.g. .gif .jpg .png .mov .mpeg .mp4 .mp3) and provide markup accordingly, just as existing [[autoembed]] solutions do.&lt;br /&gt;
&lt;br /&gt;
== implementation wishlist ==&lt;br /&gt;
It seems like an indieweb implementation of a &amp;quot;link preview&amp;quot; feature would need:&lt;br /&gt;
&lt;br /&gt;
# Open way to &amp;#039;&amp;#039;&amp;#039;markup&amp;#039;&amp;#039;&amp;#039; the info on pages that we want to go into a preview (obv min: name, summary, photo). See &amp;quot;simple link preview standard&amp;quot; above.&lt;br /&gt;
# OSS &amp;#039;&amp;#039;&amp;#039;library&amp;#039;&amp;#039;&amp;#039; that retrieves a page and &amp;#039;&amp;#039;&amp;#039;generates simple embeddable preview markup&amp;#039;&amp;#039;&amp;#039;. Such a library would return you the markup snippet with preview name/summary/photo - you just need to store that however you store information in your posts, so you can retrieve it from your store rather than the external URL. Ideally the markup snippet returned would support the same format as in #1 so it is completely re-usable without loss of fidelity.&lt;br /&gt;
# Exercise for each indieweb implementer: &amp;#039;&amp;#039;&amp;#039;code to store/cache that embeddable markup&amp;#039;&amp;#039;&amp;#039; in your personal post data store so that you can redisplay it without having to rerequest the external URL (has the advantage of snapshotting the preview as of the time you posted the note in case the external URL content changes or dies).&lt;br /&gt;
&lt;br /&gt;
Utilities:&lt;br /&gt;
* Link preview validator/previewer - a validator which would parse a URL and show you what preview might result. Note that Twitter has a [https://dev.twitter.com/docs/cards/validation/validator Twitter Card validator] (login required) - we just need to build an indieweb version of it (and not require login).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[cards]]&lt;br /&gt;
* [[h-entry]]&lt;br /&gt;
* [[POSSE]]&lt;br /&gt;
* [[silos]]&lt;br /&gt;
* [[microformats]]&lt;br /&gt;
&lt;br /&gt;
[[Category:building-blocks]]&lt;br /&gt;
* every silo has their own way of looking for these, so one page can have a different preview per silo: http://www.kevinmarks.com/partialsilos.html&lt;/div&gt;</summary>
		<author><name>Xtof</name></author>
	</entry>
</feed>