---
title: "Profile image"
manual: "Academic Profiles"
version: "3.0"
permalink: "https://docs.typo3.org/permalink/fgtclb/academic-persons:templates-profile-image@3.0"
source: "Templates/ProfileImage/Index.rst"
rendered: "2026-10-26T17:55:22+00:00"
---

# Profile image {#templates-profile-image}

The profile card and the public profile detail render the profile image through
the responsive image partial of `EXT:academic_base`,
`Academic/Image.html`. The card is the one of the list, card, selected
profiles and selected contracts content elements, and of the contacts content
element of `EXT:academic_contacts4pages`. The partial, its arguments and its
presets are described in the **Templates** chapter of
`EXT:academic_base`.

| View | Preset | Crop variant | Without an image |
| --- | --- | --- | --- |
| Profile card of the card element, `Partials/Profile/Item/Image.html` | `card` | `image.card.cropVariant` | The gender placeholder or the default one, unless both are empty |
| Profile card of every other element, `Partials/Profile/Item/Image.html` | `card` | `image.list.cropVariant` | The gender placeholder or the default one, unless both are empty |
| Public profile, `Partials/Profile/PublicProfile/ProfileImage.html` | `detail`, with the title and the names as alternative text | `image.detail.cropVariant` | No image |

When a content element limits the shown fields and leaves out the profile
image, the card shows neither the image nor the placeholder.

## The crop variant of a view {#templates-profile-image-crop-variant}

Three site settings of the set `fgtclb/academic-persons`, also declared as
TypoScript constants with the same default, choose the crop variant a view
renders:

-   **plugin.tx_academicpersons.image.list.cropVariant**

    -   *Type:* string
    -   *Default:* `default`

    The profile cards of the list, list and detail, selected profiles and
    selected contracts elements, and of the contacts of a page.

-   **plugin.tx_academicpersons.image.card.cropVariant**

    -   *Type:* string
    -   *Default:* `default`

    The profile cards of the card element.

-   **plugin.tx_academicpersons.image.detail.cropVariant**

    -   *Type:* string
    -   *Default:* `default`

    The profile image of the public profile.

The profile image offers the variants `default`, `square` and `portrait`, see
[The crop variants of the profile image](https://docs.typo3.org/permalink/fgtclb/academic-persons:configuration-crop-variants@3.0). A project that defines crop variants of its
own sets their names here. An empty value renders `default`.

An image is shown uncropped, at its own ratio, when it has no crop stored for
the variant a view requests, whatever crop it has for `default`. That is the
case for a name the image does not define, which is therefore not an error, and
for every image nobody opened and saved in the backend form since the variants
were added. It is also the case for every image uploaded through the frontend
editor of **EXT:academic_persons_edit**, which stores no crop area. A
site that sets `square` or `portrait` shows those images uncropped until an
editor crops them in the backend.

**TypoScript constants**

```typoscript
plugin.tx_academicpersons.image.card.cropVariant = square
```

All content elements share one settings array, so the card template tells the
item which view it renders: `Templates/Profile/Card.html` passes
`imageView: 'card'` to `Partials/Profile/List/Items.html`, which hands it
on to `Partials/Profile/Item.html` and from there, with all its
arguments, to `Partials/Profile/Item/Image.html`. Every other caller
leaves it out and gets the list crop variant.

A project copy of `Templates/Profile/Card.html` or
`Partials/Profile/List/Items.html`, and a copy of
`Partials/Profile/Item.html` that renders the image with arguments of its
own, has to hand `imageView` on. Without it the card renders the list crop
variant.

## The placeholder {#templates-profile-image-placeholder}

-   **plugin.tx_academicpersons.image.placeholder.default**

    -   *Type:* string
    -   *Default:* `EXT:academic_persons/Resources/Public/Images/ProfilePlaceholder.svg`

    The placeholder of a profile without an image, a neutral silhouette by
    default. An empty value switches it off: a card of a profile without an
    image then shows no image, unless a gender placeholder applies.

-   **plugin.tx_academicpersons.image.placeholder.mr**

    -   *Type:* string
    -   *Default:* empty

    The placeholder of a profile of the gender **Mr.** without an
    image. `placeholder.ms` and `placeholder.diverse` do the same for the
    other two genders. An empty value, and a profile without a gender, use
    the default placeholder.

The four are TypoScript constants and site settings of the set
`fgtclb/academic-persons`, with the same defaults. The generic one is called
`default` rather than `placeholder` itself because a site setting either holds
a value or has children, never both.

A project that adds a gender value of its own to the profile maps a placeholder
for it into the plugin settings itself, since only the three shipped values are
settings. The contacts of a page of **EXT:academic_contacts4pages**
have plugin settings of their own and need the same line:

**TypoScript setup**

```typoscript
plugin.tx_academicpersons.settings.image.placeholder.other = EXT:my_sitepackage/Resources/Public/Images/Person.svg
plugin.tx_academiccontacts4pages.settings.image.placeholder.other = EXT:my_sitepackage/Resources/Public/Images/Person.svg
```

-   An `EXT:` path to a public file of another extension, usually the site
    package, replaces the placeholder. A combined file identifier such as
    `1:/user_upload/placeholder.svg` is not supported.
-   A path that does not resolve fails the rendering, so a missing file is
    noticed when the site package is deployed rather than hidden.
-   The placeholder has an empty alternative text. It shows nobody, and the
    name is the heading of the same card.

**TypoScript constants**

```typoscript
plugin.tx_academicpersons.image.placeholder {
  default = EXT:my_sitepackage/Resources/Public/Images/Person.svg
  ms = EXT:my_sitepackage/Resources/Public/Images/PersonMs.svg
}
```

## Changing the image markup {#templates-profile-image-override}

The plugin view registers `EXT:academic_base/Resources/Private/Partials/`
with the partial root path key `-1`, below its own partials at `0` and the
project path at `1`. A project changes the markup, the breakpoints and the
widths of every profile image by placing its own `Academic/Image.html`
in the partial root path it configures through
`plugin.tx_academicpersons.view.partialRootPath` \- there is no need to
override `Profile/Item.html` for it.

The widths are deliberately not a setting. Each preset is a section of that
partial, `Preset-card` and `Preset-detail` for the profile images,
and a project that overrides the partial changes them for every academic
extension at once.

The card renders it through `Partials/Profile/Item/Image.html`, which is
where the preset, the crop variant, the placeholder and the classes are
decided. Overriding that one file changes them for the card alone, without
touching the shared partial and without copying the item - see
[Item and list partials](https://docs.typo3.org/permalink/fgtclb/academic-persons:templates-item-and-list-partials@3.0).
