SPPB 5.3.5 Image Width Anf Height Attributes - Question | JoomShaper

SPPB 5.3.5 Image Width Anf Height Attributes

A

Alvaro

SP Page Builder 1 year ago

The problem with responsive images in Sp Page Builder has always been the width and height attributes and the wrong way they entered those options but for CSS (google does not accept). I always asked for it to be done correctly and I thought they never listened to me.

Today for work I had to review the code for the media type field and I found references to width and height, so I decided to print the object on the screen which returned objects, some had width and height properties and some did not.

Then, while testing, I found that the images selected with the "Choose Image" or "Replace" buttons do not have the width and height properties, but if you write the path of the image in the field it does have those properties, so I think there is a bug.

I must congratulate you for adding that feature and also ask you to fix the bug.

Tested on: PHP 8.2.5, Mysql 8.0.18, WampServer, Windows, Firefox and Chrome latest versions, SPPB Frontend Editor.

Regards

0
2 Answers
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 year ago #165155

Hi

Thanks for contacting us and thanks for informing us. Could you please give me a screenshot of it? So that I can inform our DEV team about it.

-Regards.

0
A
Alvaro
Accepted Answer
1 year ago #165285

I think that with the objects it will be better understood: Object of image selected using buttons

stdClass Object ( [src] => images/category_01.png )

Object of an image selected by writing the path in the field

stdClass Object ( [src] => images/category_02.png [height] => 800 [width] => 540 [alt] => '')

Steps to reproduce:

  1. Drag the Image addon or any other addon that uses the media field, and select an image using the buttons.
  2. Duplicate or drag the addon again, but this time type the image path into the field without using the buttons.
  3. In the site.php file of the test addon (Image) use var_dump, print_r or whatever you prefer, print_r($this->addon->settings->image).
0