# Image block options

## Basic image block

This basic image block gives you an editable image as an `<img>` tag in  your HTML.

```php
<?php $scms->image("containerName",[]]);?>
```

{% hint style="info" %}
Only JPG/GIF/PNG images are allowed to be uploaded
{% endhint %}

## Background image block

If you want to attach a background image to a div, you can use this option. SingleCMS then renders a `style="background-image: url('...');` into your div.

```php
<div id="sideImage" <?php $scms->image("containerName",["backgroundImage"=>true]]);?>>
```

{% hint style="warning" %}
Please set all your custom styles and classes via the options of the block (see below), because if you specify it outside of the block in the HTML tag missmatches can occur and options may be lost
{% endhint %}

## Users

Per default only the `admin` account is allowed to edit the data of the blocks. To also allow other users, you can use the following block syntax

```php
<?php $scms->image("containerName",["users"=>["noAdminUser","user2"]]);?>
```

You can define as many users as you want. The users do not already have to be created in the backend. Just insert them here and create them later.

## Class

If you want to style the block in a certain way, SingleCMS provides you with the option to attach classes to the blocks

```php
<?php $scms->image("containerName",["class"=>"class1 class2"]);?>
```

## Style

If you want to style the block in a certain way, SingleCMS provides you with the option to set you style to the image.

```php
<?php $scms->image("containerName",["style"=>"width:60%;"]);?>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://singlecms.gitbook.io/documentation/image-block-options.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
