Image thumbnail in link preview

Welcome to PhotoStructure, @pac! Thanks for the suggestion.

I just verified, and OpenGraph requires the metadata to be in the <HEAD>. The current Asset view is rendered by Vue in a different part of the DOM after a call to an AJAX endpoint–so the og:* HEAD metadata has to be server-side rendered. I was thinking it would need to be cleared on navigation, but I guess the browser doesn’t care, so I’ll just leave those attributes be.

I’ve added a new openGraphWidth setting which allows you to specify roughly how large the thumbnail referenced will be. The default is 800px.

Note that base URL will be based on the requested URL. If this isn’t reliable, we’ll need to add a base URL setting override (or reuse the cspDirective setting).

This will be in the next v2023.10.0-alpha build.

1 Like