Adding width and height to the output
-
Hello,
Thanks a lot for the plugin you’ve made. It does a great job and it’s exactly what I’m looking for.
The only problem I have is about the lack of attribute in the output : for example, when using your plugin on a post, i get :
<div data-zoom="https://www.example.com/medias/image.jpg" class="zoom"><img src="https://www.example.com/medias/image.jpg"></div>
I would like to get instead a complete html code with width, height, and alt :
<div data-zoom="https://www.example.com/medias/image.jpg" class="zoom"><img src="https://www.example.com/medias/image.jpg" width="800" height="600" alt="my alternative text"></div>
Is it something possible ? Is it a feature you plan to add ?
EDIT :
For example, based on the code of your plugin, I’ve modified the line 130 of the feature-image-zoom.php file, adding this little piece of code alt=”‘ . $image_alt . ‘”, and now I’m getting the alt attribute with the appropriate content inside :$zoomfeature = '<div data-zoom="' . $full_zoom_image_url[0] . '" class="' . $class . '"><img src="' . $large_zoom_image_url[0] . '" alt="' . $image_alt . '"></div>';
I’m sure it would be pretty easy to improve your plugin but i’m not sure i’m advanced enough to do it myself.
Best regards,
J.
- The topic ‘Adding width and height to the output’ is closed to new replies.