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:
parent
a2599f8df5
commit
517ba99ba7
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue