Skip to content

Commit 204f0c3

Browse files
committed
update documentation
1 parent 51c6b5f commit 204f0c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/elements.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ To add an image, use the ``addImage`` method to sections, headers, footers, text
232232
233233
$section->addImage($src, [$style]);
234234
235-
- ``$src``. String path to a local image or URL of a remote image.
235+
- ``$src``. String path to a local image, URL of a remote image or the image data, as a string.
236236
- ``$style``. See :ref:`image-style`.
237237

238238
Examples:
@@ -254,6 +254,8 @@ Examples:
254254
$footer->addImage('http://example.com/image.php');
255255
$textrun = $section->addTextRun();
256256
$textrun->addImage('http://php.net/logo.jpg');
257+
$source = file_get_contents('/path/to/my/images/earth.jpg');
258+
$textrun->addImage($source);
257259
258260
Watermarks
259261
~~~~~~~~~~

0 commit comments

Comments
 (0)