fedimbed.bluesky: force png images

This commit is contained in:
Cynthia Foxwell 2025-06-23 13:31:29 -06:00
parent 384916e453
commit e635d2324b
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -405,7 +405,7 @@ async function blueskyQuoteEmbed(quote, minimal = false) {
accessory: { accessory: {
type: 11, type: 11,
media: { media: {
url: quote.author.avatar, url: quote.author.avatar.replace("@jpeg", "@png"),
}, },
}, },
}, },
@ -418,7 +418,7 @@ async function blueskyQuoteEmbed(quote, minimal = false) {
case "app.bsky.embed.images#view": { case "app.bsky.embed.images#view": {
images.push( images.push(
...embed.images.map((image) => ({ ...embed.images.map((image) => ({
media: {url: image.fullsize}, media: {url: image.fullsize.replace("@jpeg", "@png")},
description: trimAltText(image.alt), description: trimAltText(image.alt),
})) }))
); );
@ -436,7 +436,7 @@ async function blueskyQuoteEmbed(quote, minimal = false) {
if (embed.media.$type === "app.bsky.embed.images#view") { if (embed.media.$type === "app.bsky.embed.images#view") {
images.push( images.push(
...embed.media.images.map((image) => ({ ...embed.media.images.map((image) => ({
media: {url: image.fullsize}, media: {url: image.fullsize.replace("@jpeg", "@png")},
description: trimAltText(image.alt), description: trimAltText(image.alt),
})) }))
); );
@ -564,7 +564,7 @@ async function bluesky(msg, url, spoiler = false, minimal = false) {
case "app.bsky.embed.images#view": { case "app.bsky.embed.images#view": {
images.push( images.push(
...post.embed.images.map((image) => ({ ...post.embed.images.map((image) => ({
media: {url: image.fullsize}, media: {url: image.fullsize.replace("@jpeg", "@png")},
description: trimAltText(image.alt), description: trimAltText(image.alt),
})) }))
); );
@ -596,7 +596,7 @@ async function bluesky(msg, url, spoiler = false, minimal = false) {
if (post.embed.media.$type === "app.bsky.embed.images#view") { if (post.embed.media.$type === "app.bsky.embed.images#view") {
images.push( images.push(
...post.embed.media.images.map((image) => ({ ...post.embed.media.images.map((image) => ({
media: {url: image.fullsize}, media: {url: image.fullsize.replace("@jpeg", "@png")},
description: trimAltText(image.alt), description: trimAltText(image.alt),
})) }))
); );
@ -701,7 +701,7 @@ async function bluesky(msg, url, spoiler = false, minimal = false) {
accessory: { accessory: {
type: 11, type: 11,
media: { media: {
url: post.author.avatar, url: post.author.avatar.replace("@jpeg", "@png"),
}, },
}, },
}, },