How to add WIDTH & HEIGHT to tep_image in OSCommerce

This is what I have:

echo tep_image(DIR_WS_IMAGES . "arText.png", "ALTERNATE TEXT HERE");

Conclusion:

img src="THIS-IS-THE-IMAGE-LOCATION" alt="ALTERNATE TEXT HERE" title="ALTERNATE TEXT HERE"

My question is that I want to add WIDTH, and HEIGHTimages in tep_image function OSCommerce. Thus, the new conclusion will be as follows:

img src="THIS-IS-THE-IMAGE-LOCATION" alt="ALTERNATE TEXT HERE" title="ALTERNATE TEXT HERE" WIDTH="Sizepx" HEIGHT="Sizepx"
+3
source share
1 answer

You just need to pass the width and height as additional parameters for tep_image(), the function already supports them. Of documentation:

tep_image ($ src, $ alt = '', $ width = '', $ height = '', $ parameters = '') X-Ref
HTML image wrapper function

So it will look like

echo tep_image(DIR_WS_IMAGES . "arText.png", "ALTERNATE TEXT HERE", "width_here", "height_here");
+3
source

All Articles