fix(route/4khd): update image URL processing logic (#18761)

* fix(route/4khd): update image URL processing logic

* fix(route/4khd): update image URL processing logic
This commit is contained in:
AiraNadih
2025-04-03 16:12:35 -07:00
committed by GitHub
parent a2599f8df5
commit 517ba99ba7
+1 -1
View File
@@ -5,7 +5,7 @@ import { WPPost } from './types';
const processImages = ($) => {
$('a').each((_, elem) => {
const $elem = $(elem);
const largePhotoUrl = $elem.attr('href').replace('i0.wp.com/pic', 'img');
const largePhotoUrl = $elem.attr('href')?.replace('i0.wp.com', '').replace('pic.4khd.com', 'yt4.googleusercontent.com').replace('AsHYQ', 'AsYHQ').replace('l/AAA', 'I/AAA');
if (largePhotoUrl) {
$elem.attr('href', largePhotoUrl);
$elem.find('img').attr('src', largePhotoUrl);