Skip to content

Commit 250913d

Browse files
committed
moved to PNG over WEBP for open graph images to enable LinkedIn support
1 parent f125faf commit 250913d

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.eleventy.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ module.exports = function (eleventyConfig) {
5454
const imageSrc = path.join("src", this.page.url, src);
5555
let metadata = await pluginImage(imageSrc, {
5656
widths: [1200],
57-
formats: ["webp"],
57+
formats: ["png", "webp"],
5858
outputDir: "dist/img/"
5959
});
6060

61-
return metadata.webp[0].url.trim();
61+
return metadata.png[0].url.trim();
6262
}
6363
eleventyConfig.addLiquidShortcode("image_uri", frontMatterImageShortcode);
6464

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22
This a log of all the notable changes for [davidwesst.com](https://www.davidwesst.com/). You can find the source code on [GitHub](https://github.com/davidwesst/website).
33

4+
## [10.1.2] - 2022-11-16
5+
### Changes
6+
- Using PNG over WEBP for post open graph images for compatibility with LinkedIn
7+
48
## [10.1.1] - 2022-11-12
59
### Fixes
610
- Minor tweaks to meta tags for LinkedIn support ([#161](https://github.com/davidwesst/website/issues/161))

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dw-website",
33
"private": true,
44
"description": "The personal and somewhat professional website for David Wesst, a.k.a. DW, a.k.a. Wessty.",
5-
"version": "10.1.1",
5+
"version": "10.1.2",
66
"author": "David Wesst <[email protected]>",
77
"homepage": "https://github.com/davidwesst/website#readme",
88
"license": "MIT",

src/_layouts/base.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% assign page_type = type | default: "website" %}
1212
{% assign page_image_height = image_height | default: 630 %}
1313
{% assign page_image_width = image_width | default: 1200 %}
14-
{% assign page_image_mimetype = image_type | default: "image/webp" %}
14+
{% assign page_image_mimetype = image_type | default: "image/png" %}
1515

1616
<link rel="canonical" href="{{ page_url | url }}" />
1717
<link rel="stylesheet" href="/assets/main.css" />
@@ -35,7 +35,7 @@
3535
<meta property="og:image:secure_url" content="{{ page_image | strip | prepend: 'https://www.davidwesst.com' }}" />
3636
<meta property="og:image:alt" content="{{ image_alt }}" />
3737
{% else %}
38-
<meta name="image" property="og:image" content="https://www.davidwesst.com/static/default_og.webp" />
38+
<meta name="image" property="og:image" content="https://www.davidwesst.com/static/default_og.png" />
3939
<meta property="og:image:alt" content="A pixel art version of David Wesst with glasses in a circle, looking to the top right towards text that is his name and the subtitle 'Code. Creativity. Cool Stuff'." />
4040
{% endif %}
4141
<meta property="og:image:type" content="{{ page_image_mimetype }}" />

src/assets/static/default_og.png

329 KB
Loading

0 commit comments

Comments
 (0)