Показать сообщение отдельно
  #4 (permalink)  
Старый Вчера, 17:05
Новичок на форуме
Отправить личное сообщение для tocopiertoner Посмотреть профиль Найти все сообщения от tocopiertoner
 
Регистрация: 17.01.2026
Сообщений: 1

If the only difference is the URL pattern, you don’t need to replace the images manually—just rewrite the src values. You can select all images inside .card-image and modify the URL string.

For example:

document.querySelectorAll('.card-image img').forEach(img => {
img.src = img.src.replace('/image/cache/', '/image/')
.replace('-600x800', '');
});


This keeps the same filename and swaps in the full-size version. If the images are loaded dynamically, run this after the page content loads or observe DOM changes. This approach is lightweight and avoids re-rendering the entire image block.
Ответить с цитированием