Skip to content

Conversation

@pfefferle
Copy link
Member

@pfefferle pfefferle commented Jan 12, 2026

Fixes #2759

Proposed changes:

  • Add EXIF metadata support for ActivityPub image attachments using Schema.org vocabulary as defined in FEP-ee3a.
  • EXIF data is represented as an array of PropertyValue objects with @type, name, and value fields using the exifData property.
  • Map WordPress image_meta fields to FEP-ee3a EXIF properties:
    • created_timestampDateTime (EXIF format "YYYY:MM:DD HH:MM:SS")
    • shutter_speedExposureTime (fraction format like "1/100")
    • apertureFNumber (format like "f/2.8")
    • focal_lengthFocalLength
    • isoPhotographicSensitivity
    • cameraModel
  • Add activitypub_image_exif filter for extending EXIF data (e.g., adding Make, LensModel, GPS coordinates)

Other information:

  • Have you written new tests for your changes, if applicable?
  • Implements FEP-ee3a: EXIF Data - a Fediverse Enhancement Proposal for standardizing EXIF metadata in ActivityPub

Testing instructions:

  1. Create a post with an image that has EXIF metadata (a photo from a camera, not a screenshot)
  2. Publish the post
  3. View the ActivityPub JSON output for the post (add ?activitypub to the URL)
  4. Verify the image attachment includes an exifData array with PropertyValue objects

Example expected output:

{
  "type": "Image",
  "url": "https://example.com/image.jpg",
  "mediaType": "image/jpeg",
  "exifData": [
    {
      "@type": "PropertyValue",
      "name": "DateTime",
      "value": "2024:01:01 00:00:00"
    },
    {
      "@type": "PropertyValue",
      "name": "ExposureTime",
      "value": "1/100"
    },
    {
      "@type": "PropertyValue",
      "name": "FNumber",
      "value": "f/2.8"
    },
    {
      "@type": "PropertyValue",
      "name": "FocalLength",
      "value": "50"
    },
    {
      "@type": "PropertyValue",
      "name": "PhotographicSensitivity",
      "value": "400"
    },
    {
      "@type": "PropertyValue",
      "name": "Model",
      "value": "Canon EOS R5"
    }
  ]
}

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Add EXIF metadata support for image attachments (FEP-ee3a).

…space.

Adds support for extracting and including EXIF data from images in
ActivityPub image attachments using the Vernissage namespace.
Copilot AI review requested due to automatic review settings January 12, 2026 11:58
@pfefferle pfefferle self-assigned this Jan 12, 2026
@pfefferle pfefferle requested a review from a team January 12, 2026 11:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds EXIF metadata support for ActivityPub image attachments by implementing the Vernissage namespace specification. The implementation extracts WordPress image metadata and converts it to standardized EXIF properties that are included in ActivityPub JSON output for image attachments.

Changes:

  • Added EXIF data extraction and formatting in the Base transformer class
  • Added Vernissage namespace context to ActivityPub objects
  • Added comprehensive test coverage for EXIF metadata handling

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
includes/transformer/class-base.php Implements get_exif_data() method to extract and format EXIF metadata, and integrates it into transform_attachment()
includes/activity/class-base-object.php Adds Vernissage namespace (photos) and EXIF context to ActivityPub JSON-LD
tests/phpunit/tests/includes/transformer/class-test-post.php Adds five test cases covering EXIF data extraction, formatting, filtering, and integration
.github/changelog/2751-from-description Documents the feature addition for changelog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Change property from 'exif' (Vernissage) to 'exifData' (Schema.org)
- Use array of PropertyValue objects with @type, name, and value
- Update JSON-LD context to use schema.org vocabulary
- Field names now follow FEP-ee3a: DateTime, ExposureTime, FNumber,
  FocalLength, PhotographicSensitivity, Model
- DateTime format changed to EXIF standard "YYYY:MM:DD HH:MM:SS"

Reference: https://codeberg.org/fediverse/fep/pulls/750
@github-actions github-actions bot added the Docs label Jan 14, 2026
@pfefferle pfefferle marked this pull request as draft January 14, 2026 13:19
Changed the default value of the $offset parameter from 0 to 5 in the schedule_outbox_activity_for_federation method to adjust the scheduling behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add EXIF metadata support for image attachments

3 participants