Base attributes

url

Description: Location of linked resource.
Type: String (URL)
Version history:
1.0.0 - added

title

Description: Title of linked resource.
Type: String
Version history:
1.0.0 - added

description

Description: Description of preview.
Type: String
Version history:
1.0.0 - added

type

Description: The type of the preview card.
Type: String (Enumerable, oneOf)
link = Link OEmbed
photo = Photo OEmbed
video = Video OEmbed
rich = iframe OEmbed. Not currently accepted, so won't show up in practice.
Version history:
1.3.0 - added

Optional attributes

author_name

Description: The author of the original resource.
Type: String
Version history:
1.3.0 - added

author_url

Description: A link to the author of the original resource.
Type: String (URL)
Version history:
1.3.0 - added

provider_name

Description: The provider of the original resource.
Type: String
Version history:
1.3.0 - added

provider_url

Description: A link to the provider of the original resource.
Type: String (URL)
Version history:
1.3.0 - added

html

Description: HTML to be used for generating the preview card.
Type: String (HTML)
Version history:
1.3.0 - added

width

Description: Width of preview, in pixels.
Type: Number
Version history:
1.3.0 - added

height

Description: Height of preview, in pixels.
Type: Number
Version history:
1.3.0 - added

image

Description: Preview thumbnail.
Type: String (URL)
Version history:
1.0.0 - added

embed_url

Description: Used for photo embeds, instead of custom html.
Type: String (URL)
Version history:
2.1.0 - added

blurhash

Description: A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet.
Type: String
Version history:
3.2.0 - added

See also

Status
app/serializers/rest/preview_card_serializer.rb

Last updated July 25, 2020 ?? Improve this page