TextCMS Documentation - Internal Plugins - IMAGE

Plugin Description

Of course you can embed images manually using <img src=...> tag. But you'd need to supply the full path to your image. TextCMS provides you with plugin IMAGE to simplify the task. The syntax is [IMAGE (attributes)](image_file_name)[/IMAGE]. TextCMS will search for the image in the following locations:

File Search Locations

Some of the TextCMS plugins search for media files (images, video, audio, css etc...). They usially search in the following order:

  1. If a plugin is used in an article, it will search in the same location as the article file
  2. If a plugin is used in an article, it will also search in the _(article_name) subfolder. For example, if your article is named "test" (article file is "_articles/test.art"), it will search in folder "_articles/_test"
  3. If a plugin is used in a module, it will search in the same location as the module file
  4. If a plugin is used in a module, it will also search in the _(module_name) subfolder. For example, if your module is named "test" (module file is "_modules/test.mod"), it will search in folder "_modules/_test"
  5. If a plugin is used in an area, it will search in the same location as the area file
  6. If a plugin is used in an area, it will also search in the _(area_name) subfolder. For example, if your area is named "top" (area file is "_area/top.mod"), it will search in folder "_areas/_top"
  7. If a plugin is used in a template, it will search in the same location as the template file
  8. if a plugin is used in a template, it will also search in the _(template_name) subfolder. For example, if your template is named "test" (template file is "_templates/test.tpl"), it will search in folder "_templates/_test"
  9. it will also search in "_media" folder of your web site

Plugin Usage

This plugin can be used everywhere

Articles
Templates
Modules
Areas

Attributes

mainOptional Can be set as "main=true" to indicate that this is the main image of an article. This image will be used to generate article thumbnails. Also other plugins may use this setting. For example external plugin FACEBOOK will use this image to suggest this image to Facebook as a main web page image during sharing.
idOptionalSame as regular <img id=...> attribute
nameOptionalSame as regular <img name=...> attribute
widthOptionalSame as regular <img width=...> attribute
heightOptionalSame as regular <img height=...> attribute
altOptionalSame as regular <img alt=...> attribute
titleOptionalSame as regular <img title=...> attribute
styleOptionalSame as regular <img style=...> attribute

Styling

This plugin does not support plugin-specific styling.

Example

[IMAGE main=true width=600px height=400px alt="test image"]test.png[/IMAGE]
(c) 2018-2024 TextCMS