Descrição
(async function() {
const imageName = ‘S26_W_SunblockerSS_S1_LG’;
const imageFormat = ‘png’;
const pictureId = ‘responsive-image-i0w0_6f5f357d_88e0_4563_9df2_9b3fb35f2786’;
// Extract base name from image filename
let baseName = imageName;
if (imageName.includes(‘_XL’)) {
baseName = imageName.replace(‘_XL’, ”);
} else if (imageName.includes(‘_LG’)) {
baseName = imageName.replace(‘_LG’, ”);
} else if (imageName.includes(‘_MD’)) {
baseName = imageName.replace(‘_MD’, ”);
} else if (imageName.includes(‘_SM’)) {
baseName = imageName.replace(‘_SM’, ”);
}
// Initialize global cache if it doesn’t exist
if (!window.imageExistenceCache) {
window.imageExistenceCache = new Map();
}
// Check if we have cached results for this base name
if (window.imageExistenceCache.has(baseName)) {
const existenceResults = window.imageExistenceCache.get(baseName);
updatePictureSources(existenceResults);
return;
}
// Function to check if image exists via HTTP HEAD request
async function checkImageExists(url) {
try {
const response = await fetch(url, { method: ‘HEAD’ });
return response.ok;
} catch (error) {
// Silently handle network errors without console spam
return false;
}
}
// Check all possible sizes
const sizes = [‘SM’, ‘MD’, ‘LG’, ‘XL’];
const existenceResults = {};
// Use Scene7 format auto-detection instead of hardcoded extensions
for (const size of sizes) {
const url = `https://media.columbia.com/i/columbiasprtswr/${baseName}_${size}?fmt=auto`;
existenceResults[size] = await checkImageExists(url);
}
// Log availability for debugging (only if some sizes are missing)
const availableSizes = Object.values(existenceResults).filter(Boolean).length;
const totalSizes = sizes.length;
/*if (availableSizes source.remove());
// Create new sources with optimal sizes
const breakpoints = [
{ media: ‘(max-width: 575px)’, preferSize: ‘SM’ },
{ media: ‘(min-width: 576px) and (max-width: 1023px)’, preferSize: ‘MD’ },
{ media: ‘(min-width: 1024px) and (max-width: 1439px)’, preferSize: ‘LG’ },
{ media: ‘(min-width: 1440px)’, preferSize: ‘XL’ }
];
breakpoints.forEach((breakpoint, index) => {
let optimalSize = ”;
// Determine optimal size for this breakpoint
if (breakpoint.preferSize === ‘SM’) {
optimalSize = existenceResults.SM ? ‘SM’ : ‘BASE’;
} else if (breakpoint.preferSize === ‘MD’) {
optimalSize = existenceResults.MD ? ‘MD’ : (existenceResults.SM ? ‘SM’ : ‘BASE’);
} else if (breakpoint.preferSize === ‘LG’) {
optimalSize = existenceResults.LG ? ‘LG’ : (existenceResults.MD ? ‘MD’ : (existenceResults.SM ? ‘SM’ : ‘BASE’));
} else if (breakpoint.preferSize === ‘XL’) {
optimalSize = existenceResults.XL ? ‘XL’ : (existenceResults.LG ? ‘LG’ : (existenceResults.MD ? ‘MD’ : (existenceResults.SM ? ‘SM’ : ‘BASE’)));
}
// Create new source element
const newSource = document.createElement(‘source’);
newSource.setAttribute(‘media’, breakpoint.media);
let srcset = ”;
if (optimalSize === ‘BASE’) {
srcset = `https://media.columbia.com/i/columbiasprtswr/${imageName}?fmt=auto&$aem_${imageFormat}$`;
} else {
srcset = `https://media.columbia.com/i/columbiasprtswr/${baseName}_${optimalSize}?fmt=auto&$aem_${imageFormat}$`;
}
newSource.setAttribute(‘srcset’, srcset);
// Insert before the img element
picture.insertBefore(newSource, img);
});
// Ensure lazy loading attributes are preserved
if (img) {
// Check if the image has lazy loading attributes
const hasLazyClass = img.classList.contains(‘lazy’);
const hasDataSrc = img.hasAttribute(‘data-src’);
if (hasLazyClass || hasDataSrc) {
// Make sure the lazy class is present
if (!img.classList.contains(‘lazy’)) {
img.classList.add(‘lazy’);
}
// Preserve or restore data-src attribute
if (originalDataSrc) {
img.setAttribute(‘data-src’, originalDataSrc);
}
}
}
// Reinitialize vanillaLazyLoad if it exists
if (window.vanillaLazyLoad && typeof window.vanillaLazyLoad.update === ‘function’) {
window.vanillaLazyLoad.update();
} else if (window.vanillaLazyLoad && typeof window.vanillaLazyLoad.init === ‘function’) {
window.vanillaLazyLoad.init();
}
}
})();
Quando o sol começa a esquentar tudo ao redor, o Mangas Curtas Sunblocker™ está lá com tecido UPF 50+ para proteger sua pele dos raios UV prejudiciais. Esta camiseta cropped é feita com mais de 50% de poliéster reciclado e possui costuras amigáveis para mochila para evitar atritos que interrompam sua viagem.
Usos: Escalada em rochas, Caminhadas, Acampamento
UPF 50 filtra os raios UV intensos
Recomendado pela The Skin Cancer Foundation
Propriedades de eliminação de umidade
Desenhado para ser usado diretamente na pele ou sobre uma camiseta
Comprimento curto com barra arredondada
Logotipo MHW impresso por tela na parte inferior esquerda da barra
Importado














Avaliações
Ainda não existem avaliações.