Specifying Image Dimensions

Does anyone know hot to fix the code in Responsive to show the image dimensions in the img src code…

We are getting an F on Gtmetrix due to all the images not specifying dimensions… ??

No one has delt with this issue…?

on forum read that this can be solved by eetting image fim under imsge/thumbnails settings but i didn't try this or think that this is as solution.

[quote name='demeldoo' timestamp='1434550175' post='219181']

on forum read that this can be solved by eetting image fim under imsge/thumbnails settings but i didn't try this or think that this is as solution.

[/quote]



Nope… Cannot be done… You can change dimensions but the image dimension is not stated in the page code when rendered…

Try to open the design\themes\responsive\templates\common\image.tpl file and replace:



{$image_data.alt}




with



{$image_data.alt}




(!) Not tested

[quote name='eComLabs' timestamp='1434551302' post='219186'] Try to open the design\themes\responsive\templates\common\image.tpl file and replace: [img]{if $generate_image}{$images_dir}/icons/spacer.gif{else}{$image_data.image_path}{/if}[/img] with [img]{if $generate_image}{$images_dir}/icons/spacer.gif{else}{$image_data.image_path}{/if}[/img] (!) Not tested [/quote]



That worked… Thank You…



Does anyone know why all images have the query string ?t=xxxxxxxxxxx where xxxxxxxxxxx = id number…

Can this be stopped…

[quote name='CarStickersDecals' timestamp='1434686769' post='219465']

Does anyone know why all images have the query string ?t=xxxxxxxxxxx where xxxxxxxxxxx = id number…

Can this be stopped…

[/quote]



It was added for cache purposes

[quote name='CarStickersDecals' timestamp='1434686769' post='219465']





That worked… Thank You…



Does anyone know why all images have the query string ?t=xxxxxxxxxxx where xxxxxxxxxxx = id number…

Can this be stopped…

[/quote]



i see u have this resolved. does the image dimension have to be set also in cs admin panel? is it pulling data from there

[quote name='demeldoo' timestamp='1434961960' post='219863']

i see u have this resolved. does the image dimension have to be set also in cs admin panel? is it pulling data from there

[/quote]



It just pulls the data that is set in admin… Works great…

[quote name='CarStickersDecals' timestamp='1434981659' post='219927']





It just pulls the data that is set in admin… Works great…

[/quote]



i ses u don't use a on sale grid block… this solution is not showing some images on the block

Please report the lack of width/height attributes in img tags to the bugtracker using your examples.

[quote name='eComLabs' timestamp='1434705767' post='219511']

It was added for cache purposes

[/quote]

How can this be removed if some one wants to remove it?

Please try top open the app\Tygh\Backend\Storage\File.php file and comment out the following code:



if (is_file($real_file)) { // add timestamp to files only, skip dirs
$file .= '?t=' . filemtime($real_file);
}




(!) Not tested

[quote name='eComLabs' timestamp='1435136938' post='220181']

Please try top open the app\Tygh\Backend\Storage\File.php file and comment out the following code:



if (is_file($real_file)) { // add timestamp to files only, skip dirs
$file .= '?t=' . filemtime($real_file);
}




(!) Not tested

[/quote]



What ill effect can this have on the site? SEO? Cache?

[quote name='CarStickersDecals' timestamp='1435177506' post='220255']

What ill effect can this have on the site? SEO? Cache?

[/quote]



I also wonder if it effects CDN

From Russian forum:


[quote]This parameter was added to improve the CDN performance[/quote]



Unfortunately, I cannot make the necessary tests now. Please contact CS-Cart support team with this question

[quote name='eComLabs' timestamp='1435136938' post='220181']

Please try top open the app\Tygh\Backend\Storage\File.php file and comment out the following code:



if (is_file($real_file)) { // add timestamp to files only, skip dirs
$file .= '?t=' . filemtime($real_file);
}




(!) Not tested

[/quote]



Has anyone tried this yet…

Yes, we tried it. It work fine. But, we don't use CDN so don't know how it will affect it.

SEO and cache seems not to be affected.



V. 4.3.2



Thanks ecomlabs

Alex

Alex, thank you for sharing this information

[quote name='carlyval' timestamp='1435744413' post='221189']

Yes, we tried it. It work fine. But, we don't use CDN so don't know how it will affect it.

SEO and cache seems not to be affected.



V. 4.3.2



Thanks ecomlabs

Alex

[/quote]



Thank you Alex… We don't use CDN either so not to worried about that… We'll give it a try…



Also thank you eComLabs… For sharing your code mods…