Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

How to get size of image? #194

Open
zacky1972 opened this issue Jun 17, 2023 · 0 comments
Open

How to get size of image? #194

zacky1972 opened this issue Jun 17, 2023 · 0 comments

Comments

@zacky1972
Copy link

Facebook's share debugger said that og:image:width and og:image:height tags should be used with og:image tag.

So, I'd like to describe _layout.slime as follows, but of course, this does not work:

doctype html
html
  head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#"
    title TITLE
    meta charset="UTF-8"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    = link_to_css @env, "css/theme.css", media: "all"
    meta name="twitter:card" content="summary"
    meta name="twitter:site:id" content="@twitter_id"
    meta name="twitter:creator:id" content="@twitter_id"
    meta name="twitter:title" content=@title
    meta name="twitter:description" content=@description
    meta property="og:title" content=@title
    meta property="og:site_name" content="TITLE"
    meta property="og:type" content="article"
    meta property="og:description" content=@description
    meta property="og:image" content=@image
    meta property="og:image:width" content=@image_width
    meta property="og:image:height" content=@image_height
  body
    = @children

How should I describe this instead of using @image_width and @image_height?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant