0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Adjusted oembed endpoints to fetch higher resolution thumbnails

no issue

- embed cards now store metadata including thumbnail urls in their payload
- we want to use this metadata to render video cards in emails
- by default oembed endpoints return fairly small thumbnail images that don't look great when blown up
- oembed supports a `maxwidth` query param that will instruct oembed providers to return larger sizes of the content if available
This commit is contained in:
Kevin Ansfield 2020-04-29 16:41:31 +01:00
parent 6d21bbfc63
commit 1f85ef46d2
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ function unknownProvider(url) {
}
function knownProvider(url) {
return extract(url).catch((err) => {
return extract(url, {maxwidth: 1280}).catch((err) => {
return Promise.reject(new common.errors.InternalServerError({
message: err.message
}));

View file

@ -37,7 +37,7 @@ function unknownProvider(url) {
}
function knownProvider(url) {
return extract(url).catch((err) => {
return extract(url, {maxwith: 1280}).catch((err) => {
return Promise.reject(new common.errors.InternalServerError({
message: err.message
}));