feat: mirror VK photos to image host
This commit is contained in:
1 parent
20b434dbcd
commit
f6c2275af3
7 files changed
+98
-6
No files matched your search
+4
-3
@@ -55,9 +55,10 @@
|
||||
row.append(cell(`${item.input.kitten_name || '—'} [${item.input.kitten_id || '—'}]`));
|
||||
const photos = document.createElement('td');
|
||||
(item.input.attachments || []).forEach(photo => {
|
||||
if (!photo.url) return;
|
||||
const link = document.createElement('a'); link.href = photo.url; link.target = '_blank'; link.rel = 'noopener';
|
||||
const image = document.createElement('img'); image.src = photo.url; image.alt = 'Фото'; image.loading = 'lazy';
|
||||
const photoUrl = photo.mirror_url || photo.url;
|
||||
if (!photoUrl) return;
|
||||
const link = document.createElement('a'); link.href = photoUrl; link.target = '_blank'; link.rel = 'noopener';
|
||||
const image = document.createElement('img'); image.src = photoUrl; image.alt = 'Фото'; image.loading = 'lazy';
|
||||
link.append(image); photos.append(link);
|
||||
});
|
||||
if (!photos.childNodes.length) photos.textContent = '—';
|
||||
|
||||
Reference in new issue
Block a user