delavigne
asked 11 years ago

Detect and put the size of the image clients logo in the html code.

Hi, ​

In “DW One Page Modern” ​I wish to detect and put the width and height of the “image clients logo” in the Html code.

Do you already have a solution ? Or, what is the page displaying logos customers ?

Thanks.

2 Answers
delavigne
answered 11 years ago

Hi,
I put this in “Shortcodes.php” :

$size = getimagesize($client_logo);
$src_w = $size[0];
$src_h = $size[1];

And for the image src :

<img src=”‘.$client_logo.'” alt=”‘.$client_title.'” width=”‘.$src_w.'” height=”‘.$src_h.'”>

It’s ok.

Thanks.

DominicStaff
answered 11 years ago

I think you have resolved this issue. I appreciate it.

Powered by DW Question & Answer Pro