I want to insert pictures on a news block, showing the results of DNA test. Is this possible? If so, how to do it? I've looked around and did not find any possible way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Help text associated with the News block gives lots of information about what can be entered in the News text. It says that HTML tags and HTML entities are allowed.
Note that you aren't actually inserting an image into the News text. Instead, you're inserting a pointer where the image file can be found. This image file could reside in the "media" directory (you will need at least 755 permission on this file).
Suppose the image file is called "foo.jpg" and lives in the "media" directory. The img tag would then be: <img src="media/foo.jpg" alt="My image name" width=xxx height=yyy> with "xxx" and "yyy" being the width and height, in pixels.
To preserve the aspect ratio of the image, specify either the desired width or the desired height, but not both. If you omit both the width= and the height= specification, the image will be displayed in its original size. The results of this can be very surprising.
Last edit: Gerry Kroll 2019-01-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to insert pictures on a news block, showing the results of DNA test. Is this possible? If so, how to do it? I've looked around and did not find any possible way.
The Help text associated with the News block gives lots of information about what can be entered in the News text. It says that HTML tags and HTML entities are allowed.
To insert an image, you would use the <img ....> tag, as described here:
https://www.w3schools.com/tags/tag_img.asp and
https://www.w3schools.com/HTML/html_images.asp
Do a Google search for "html img" .
Note that you aren't actually inserting an image into the News text. Instead, you're inserting a pointer where the image file can be found. This image file could reside in the "media" directory (you will need at least 755 permission on this file).
Suppose the image file is called "foo.jpg" and lives in the "media" directory. The img tag would then be: <img src="media/foo.jpg" alt="My image name" width=xxx height=yyy> with "xxx" and "yyy" being the width and height, in pixels.
To preserve the aspect ratio of the image, specify either the desired width or the desired height, but not both. If you omit both the width= and the height= specification, the image will be displayed in its original size. The results of this can be very surprising.
Last edit: Gerry Kroll 2019-01-25