Descrição
(async function() {
const imageName = ‘S26_W_PeakRamblerShort_S1_LG’;
const imageFormat = ‘png’;
const pictureId = ‘responsive-image-i0w0_7197eafb_887c_423e_952a_d427c3fe6284’;
// 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();
}
}
})();
Pelos campos sem pavimentação, saltando sobre riachos ou avançando em curvas íngremes — o tecido leve e elástico acompanha seus movimentos, oferecendo liberdade e conforto em longas trilhas. Um cinto ajustável na cintura é discreto no quadril com um único laço para enfiar a ponta, enquanto o botão frontal mantém o visual limpo. Um bolso envolvente e um gancho traseiro proporcionam acesso fácil aos itens essenciais, mesmo durante escaladas ou carregando uma mochila. Com proteção UV de fator 50 (UPF 50), essas calças bloqueiam 98% dos raios UV prejudiciais, ajudando a proteger sua pele durante longas horas em trilhas expostas. Tão leves que é fácil deixar a mente vagar e os pés seguirem seu próprio ritmo.
Acabamento DWR sem PFC
UPF 50
Cinto ajustável na cintura
Elástico na parte de trás da cintura para fácil colocação e movimento dinâmico
Botão e zíper na frente com fechamento por botão
Bolsos traseiros com fechamento seguro
Elástico na parte de trás da cintura
Logotipo MHW na frente esquerda
Importado















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