[ad_1]
Hi Tim!
It would be great if you could share a bit more information so that it’s possible to help you!
- What have you tried to set the image size? In the example you shared, you are only adding a
srcattribute. You might want to add awidthorheight. For example, if you want the image to have a fixed height of 300px you could do this:echo '<img src="' . esc_url( plugins_url( '/plugin-name/assets/img/image.png' ) ) . '" width="300"> '; - Is there an error message? If yes, what does it say?
- What is the
plugin-namein your example? - In general, it is better to leave the image handling to WordPress itself. Is there any reason you could not use the Image block on your site?
Hi Michal,
Thank you very much for your quick response, and thank you for your suggestion, as that corrected the issue. I was using single quotes which was producing an error.
Cheers!
