DOCS

Gallery images

Fundations supports a photo gallery on each fundraising page. Fundraisers can add multiple images during the creation wizard or through the frontend edit form. The gallery is a free feature.

Why use it

A gallery lets fundraisers tell their story with photos: training progress, team photos, event moments, or before-and-after images. Multiple images give donors richer context and can increase engagement with the campaign.

What it does

Each fundraising page can hold up to 5 gallery images by default (configurable). Images are stored as WordPress media library attachments linked to the post via the _get_fund_gallery_images meta key.

Features:

  • Upload during the wizard or through the frontend edit form.
  • Drag-and-drop reorder in the edit form.
  • Remove individual images.
  • Server-side automatic resizing if images exceed the maximum dimensions.
  • Deleting an image from the WordPress media library removes it from all galleries automatically.
  • REST API endpoints for reading and writing gallery data programmatically.
  • A public meta alias get_fund_gallery_images (without the leading underscore) for compatibility with Greenshift and other page builders that do not read underscore-prefixed meta keys.

Supported file types: JPEG, PNG, WebP, GIF.

Gallery upload form

How to use it

During campaign creation

  1. In the Action Wizard, look for the Gallery section.
  2. Click Upload Image and select images from your device.
  3. Each image is validated for file type and resized if needed.
  4. Continue through the wizard and submit.
  1. Go to the frontend edit form for your campaign (see Editing Campaigns).
  2. Find the Gallery section.
  3. To reorder: drag and drop the thumbnails into the desired order.
  4. To remove an image: click the remove button on the thumbnail.
  5. To add images: click Upload Image and select files.
  6. Save the form.
Gallery edit drag drop

Settings & options

OptionDefaultDescription
get_fund_gallery_max_images5Maximum number of gallery images per campaign
get_fund_gallery_max_width1920Maximum image width in pixels (images are resized if wider)
get_fund_gallery_max_height1080Maximum image height in pixels (images are resized if taller)

The featured image (separate from the gallery) uses different constraints: JPEG, PNG, or WebP only (no GIF), maximum 5 MB, and the filename is hashed to 24 characters when uploaded through the wizard.

What you can and cannot do

Details
Upload limitUp to 5 images per campaign by default; configurable via the get_fund_gallery_settings filter
Supported formatsJPEG, PNG, WebP, GIF
ReorderingDrag to reorder in the frontend edit form
REST API accessGallery data is readable and writable via the REST API
Greenshift integrationUse gallery images in Greenshift Query Loop blocks with the get_fund_gallery=current query variable
Videos and documentsNot supported as gallery items
Per-campaign limitNot available; the limit is global only

Troubleshooting

ProblemLikely causeFix
Upload fails with a file type errorThe file is not JPEG, PNG, WebP, or GIFConvert the image to a supported format before uploading
Image appears smaller than uploadedServer resized it to fit the maximum dimensionsThis is expected behaviour; increase get_fund_gallery_max_width / _max_height if needed
Gallery is empty after deleting from media libraryThe attachment was deleted from the media library, removing it from galleriesRe-upload the image
Images appear in wrong order after refreshReorder was not savedMake sure to click Save Changes after reordering
Cannot upload more than 5 imagesDefault maximum is 5Use the get_fund_gallery_settings filter to increase the limit

Developer reference

REST API endpoints

MethodEndpointDescription
GET/wp-json/get-fund/v1/actions/{id}/galleryRetrieve gallery image data for a campaign
POST/wp-json/get-fund/v1/actions/{id}/galleryReplace gallery image IDs (body: image_ids[])
DELETE/wp-json/get-fund/v1/actions/{id}/gallery/{image_id}Remove a single image from the gallery

Greenshift Query Loop

To display gallery images using a Greenshift Query Loop block, add the query variable get_fund_gallery=current to the block. The gallery will inject the campaign’s attachment IDs into the loop.

Hooks and filters

HookTypeDescription
get_fund_gallery_settingsfilterModify the entire settings array; receives array $settings
get_fund_gallery_image_datafilterModify per-image data returned by the gallery; receives array $image_data, int $attachment_id
get_fund_wizard_allowed_image_typesfilterModify allowed MIME types for the featured image uploaded via the wizard

Signatures

// Increase the gallery limit to 10 images
add_filter( 'get_fund_gallery_settings', function( array $settings ) {
    $settings['max_images'] = 10;
    return $settings;
} );

// Add a custom data field to each gallery image
add_filter( 'get_fund_gallery_image_data', function( array $image_data, int $attachment_id ) {
    $image_data['caption'] = wp_get_attachment_caption( $attachment_id );
    return $image_data;
}, 10, 2 );

// Allow AVIF uploads for featured images in the wizard
add_filter( 'get_fund_wizard_allowed_image_types', function( array $types, int $post_id ) {
    $types[] = 'image/avif';
    return $types;
}, 10, 2 );

The $settings array shape

KeyTypeDescription
max_imagesintMaximum number of gallery images
max_widthintMaximum image width in pixels
max_heightintMaximum image height in pixels
allowed_typesarrayArray of allowed MIME type strings

The $image_data array shape

KeyTypeDescription
idintAttachment ID
urlstringFull-size image URL
fullstringFull-size image URL
thumbnailstringThumbnail size URL
mediumstringMedium size URL
largestringLarge size URL
altstringAlt text
captionstringCaption
titlestringAttachment title