.. include:: /Includes.rst.txt .. index:: Content objects; IMAGE_RESOURCE .. _cobj-img-resource: ============= IMG\_RESOURCE ============= Objects of type IMG_RESOURCE returns a reference to an image, possibly wrapped with :ref:`cobj-img-resource-stdWrap`. It can be used, for example, for putting background images in tables or table rows or to import an image in your own include scripts. The array :php:`$GLOBALS['TSFE']->lastImgResourceInfo` is set to the info array of the resulting image resource (if any) and contains width, height and so on (similar to how :php:`$GLOBALS['TSFE']->lastImageInfo` does for the cObject IMAGE). Depending on your use case you might prefer using the cObject :ref:`IMAGE `, which creates a complete :html:`img` tag. .. contents:: :local: .. _cobj-img-resource-properties: Properties ========== .. confval-menu:: :display: table :type: .. _cobj-img-resource-cache: .. confval:: cache :name: img-resource-cache :type: :ref:`cache ` See :ref:`cache function description ` for details. .. _cobj-img-resource-file: .. confval:: file :name: img-resource-file :type: :ref:`->imgResource ` .. _cobj-img-resource-stdWrap: .. confval:: stdWrap :name: img-resource-stdWrap :type: :ref:`->stdWrap `