Image Sizes & Cropping

5 min read

Updated May 26, 2026

FotoGrids generates its own image derivatives so that gallery thumbnails and Lightbox images are sized correctly for the layout — independently of WordPress’ default thumbnail, medium, and large sizes. The Media tab in Plugin Settings is where you choose the dimensions, crop mode, and crop alignment for those derivatives.

Location FotoGrids Settings Media


How FotoGrids image sizes work #

WordPress generates each registered image size at upload time and stores it as a separate file alongside the original. FotoGrids registers two sizes of its own — plus a hidden mobile companion — and uses these in place of WordPress’ built-in sizes wherever a Gallery is rendered.

FotoGrids ThumbnailUsed for every item shown in a gallery grid. Slug fotogrids_thumbnail.
FotoGrids Full ImageThe full-size image shown in the Lightbox. Slug fotogrids_full.
FotoGrids Full (Mobile)A hidden companion at half the full-image width, generated automatically. Used by the Lightbox to serve a smaller image to mobile devices. Slug fotogrids_full_mobile.

The two visible sizes are configured from the Media tab. The mobile companion is derived from the Full Image width — you don’t configure it directly.

Changing image sizes only affects images uploaded after the change. To rebuild derivatives for images already in the media library, use the Regenerate Thumbnails tool.


Gallery thumbnails #

The size used for every item in a gallery grid.

Dimensions

SettingDimensions
RangeWidth 1–2000, Height 0–2000
Unitspx
Default400 × 300

Width sets the rendered width of each thumbnail. Height sets the rendered height when the thumbnail is hard-cropped — when soft crop is used, height is treated as a maximum and the image is scaled proportionally to fit.

Crop mode

SettingCrop mode
OptionsHard crop Soft crop
DefaultHard crop

Two ways to fit the source image to the target dimensions:

  • Hard crop — Every thumbnail is cropped to the exact dimensions. The aspect ratio of the grid stays uniform; parts of the source image outside the crop box are cut off.
  • Soft crop — The original aspect ratio is preserved. The image is scaled to fit inside the target box without cropping; some thumbnails end up narrower or shorter than others.

Hard crop is the right choice for grids that need to look visually uniform. Soft crop is better when the composition of each image matters more than a tidy grid.

Crop alignment

SettingCrop alignment
OptionsTop Left Top Center Top Right Center Left Center Center Right Bottom Left Bottom Center Bottom Right
DefaultCenter
Visible whenCrop mode is set to Hard crop

When hard crop is on, this controls which part of the source image is kept. Center works well for general-purpose galleries; use Top or Top Center for portrait subjects where faces sit near the top of the frame.


Lightbox image #

The full-size image shown when an item is opened in the Lightbox. This size is always scaled proportionally — never hard-cropped — so the original composition is preserved.

Max width

SettingMax width
Range1–8000
Unitspx
Default1920

The largest width FotoGrids will generate for the Lightbox image. Source images larger than this are downscaled; smaller ones are left at their original size.

A mobile companion at half this width is generated automatically — for the default 1920 px Max width, the mobile companion is 960 px. The Lightbox serves this smaller file to phones to keep page weight down.

Max height

SettingMax height
Range0–8000
Unitspx
Default0 (proportional)

Optional. Leave at 0 — the recommended value — to let height scale proportionally with width. Set a non-zero value only when you need to enforce a height cap as well, for example to stop very tall images from overflowing on shorter viewports.


Per-Gallery overrides #

The Media tab in Plugin Settings sets the plugin-wide image sizes. An individual Gallery can override these from its own editor at Gallery SettingsMedia, where the Thumbnail Size and Full Image Size controls offer the FotoGrids sizes, the standard WordPress sizes (Thumbnail, Medium, Large, Full), and a Custom option for one-off dimensions.

When a Gallery uses a Custom size, FotoGrids registers a new image size for that exact combination of width, height, and crop settings, and remembers which Gallery created it. These gallery-custom sizes appear in a separate panel on the Media tab so you can see what’s in use across your site.

Gallery-custom sizes are read-only on the Media tab. To change a custom size, edit it from the Gallery that defined it.


Gallery-custom sizes panel #

If any of your Galleries use a Custom thumbnail or full image size, the Media tab shows a third panel listing every custom size registered by your Galleries.

SlugThe internal name of the size, in the form fotogrids_custom_{width}x{height}_{crop|nocrop}.
DimensionsWidth × height in pixels. Height shows as ? for proportional sizes.
CropWhether this size is hard-cropped.
GalleriesNumber of Galleries that use this size.

When a Gallery that defined a custom size is deleted, the size’s Galleries count drops by one. Once no Galleries reference a custom size, it is removed from the registry — the derivative files on disk are left in place.


When to regenerate #

Changing the Dimensions, Crop mode, or Crop alignment fields does not modify any existing files. WordPress only generates image sizes at upload time, so existing items in your Galleries continue to use the old derivatives until you rebuild them.

Use the Regenerate button at the top of the Gallery thumbnails panel, or the Regenerate thumbnails button at the bottom of the Media tab, to open the Regenerate Thumbnails tool and rebuild derivatives for the images already in your Galleries.

Regenerating overwrites existing derivative files on disk. The original upload is never touched, so this is safe to repeat as often as you need.

Was this article helpful?