# Image styling for xwiki.org

**URL:** <https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925>\
**Category:** Development\
**Tags:** proposal\
**Created:** [May 7, 2025, 2:54pm UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925 "2025-05-07T14:54:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 7, 2025, 2:54pm UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/1 "2025-05-07T14:54:00Z")

</div>

Hi devs,

## Proposal 1

We’re currently using an image macro to have a consistent style on [xwiki.org](http://xwiki.org). I wanted to propose to move to the Image Style feature of XWiki. However, we can’t, because of [Loading...](https://jira.xwiki.org/browse/XWIKI-23182)

Until this is fixed, I propose to continue to use the image macro but to modify it to add a `style` parameter with the values `small`, `medium`, `large` and `extra` (for extra large). See [https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages) for the corresponding widths.

This will allow to have consistency in images sizes.

For now we can’t remove the `width` parameter (to avoid regressions/backward compat) but we will indicate in the doc guide that it must not be used anymore.

Once [Loading...](https://jira.xwiki.org/browse/XWIKI-23182) is fixed, we will review this proposal again.

## Proposal 2

In addition since we now have the Lightbox feature, I propose to remove the ability to click the image to open it in full (as it duplicates the lightbox feature).

WDYT?

Thx

---

<div class="post-metadata">

**Author:** ![surli](https://forum.xwiki.org/user_avatar/forum.xwiki.org/surli/32/2687_2.png) [@surli](https://forum.xwiki.org/u/surli)\
**Post date:** [May 12, 2025, 3:50pm UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/2 "2025-05-12T15:50:15Z")

</div>

> [@vmassol](#):
>
> We’re currently using an image macro to have a consistent style on [xwiki.org](http://xwiki.org).

Interesting, I thought the rule was to use the gallery macro for images in documentation.

> [@vmassol](#):
>
> Until this is fixed, I propose to continue to use the image macro but to modify it to add a `style` parameter with the values `small`, `medium`, `large` and `extra` (for extra large). See [https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages) for the corresponding widths.

+1

If it’s a dedicated macro for [xwiki.org](http://xwiki.org) I’m wondering if we also couldn’t add an optional “version” parameter to use when adding screenshots, to have a better way to know (and let the user knows) the version of XWiki they’re seeing: as mentioned in another topic it’s not easy to maintain all screenshot up to date, but maybe it might help to see the metadata a bit like what we have with the version macro.

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [May 12, 2025, 4:07pm UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/3 "2025-05-12T16:07:05Z")

</div>

> [@vmassol](#):
>
> I propose to continue to use the image macro but to modify it to add a `style` parameter with the values `small`, `medium`, `large` and `extra` (for extra large). See [https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages) for the corresponding widths.

+1

> [@surli](#):
>
> If it’s a dedicated macro for [xwiki.org](http://xwiki.org) I’m wondering if we also couldn’t add an optional “version” parameter to use when adding screenshots, to have a better way to know (and let the user knows) the version of XWiki they’re seeing: as mentioned in another topic it’s not easy to maintain all screenshot up to date, but maybe it might help to see the metadata a bit like what we have with the version macro.

That’s a good idea indeed.

---

<div class="post-metadata">

**Author:** ![mflorea](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mflorea/32/49_2.png) [@mflorea](https://forum.xwiki.org/u/mflorea)\
**Post date:** [May 13, 2025, 7:15am UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/4 "2025-05-13T07:15:40Z")

</div>

> [@surli](#):
>
> If it’s a dedicated macro for [xwiki.org](http://xwiki.org) I’m wondering if we also couldn’t add an optional “version” parameter to use when adding screenshots, to have a better way to know (and let the user knows) the version of XWiki they’re seeing: as mentioned in another topic it’s not easy to maintain all screenshot up to date, but maybe it might help to see the metadata a bit like what we have with the version macro.

We just need to remember to update the content when we update the screenshot (e.g. when uploading a new version of the image with the same name as before, but taken from a diffrent XWiki version).

+1 for the proposal.

Thanks,  
Marius

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 16, 2025, 9:24am UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/5 "2025-05-16T09:24:30Z")

</div>

> [@surli](#):
>
> If it’s a dedicated macro for [xwiki.org](http://xwiki.org) I’m wondering if we also couldn’t add an optional “version” parameter to use when adding screenshots, to have a better way to know (and let the user knows) the version of XWiki they’re seeing: as mentioned in another topic it’s not easy to maintain all screenshot up to date, but maybe it might help to see the metadata a bit like what we have with the version macro.

IMO this is already taken care of with the version macro (and it’s more generic than just images). See [https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide) which explains that we’re already supposed to use it for images (along with text).

There’s also a process to remove that info regularly in the doc guide.

Note: I see no difference between images and text re versioning and maintenance.

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 16, 2025, 9:39am UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/6 "2025-05-16T09:39:50Z")

</div>

I’ve now implemented it, see [https://www.xwiki.org/xwiki/bin/view/Macros/ImageMacro?viewer=changes&rev1=20.1&rev2=23.1&](https://www.xwiki.org/xwiki/bin/view/Macros/ImageMacro?viewer=changes&rev1=20.1&rev2=23.1&)

I’ll update the doc guide.

Thanks

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 16, 2025, 9:46am UTC](https://forum.xwiki.org/t/image-styling-for-xwiki-org/16925/7 "2025-05-16T09:46:13Z")

</div>

Doc updated: [https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide?viewer=changes&rev1=42.2&rev2=43.3&](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide?viewer=changes&rev1=42.2&rev2=43.3&)
