Upgrade to 1.0.0-rc784

Concerns: pushword/admin, pushword/core

Image license metadata (Google "Licensable" badge)

Media can now carry licensing properties, emitted as schema.org ImageObject structured data next to every rendered <picture>. See Image license for the feature itself; this section only lists what an existing installation has to do.

A new column, so the schema must be updated:

php bin/console doctrine:schema:update --force

media.license_state records how each media got its licensing ('', seeded, thirdParty, overridden). New uploads set it themselves; the existing library does not, so run the backfill once:

php bin/console pw:media:license --dry-run   # read the report first
php bin/console pw:media:license

The dry run matters: the command reads the rights already embedded in each file, and a file that credits somebody else is never given the site's licensing. Those are listed by name so you can decide on each one — either in the admin, or in bulk with --force, which asserts that the site owns them despite what the file says.

Nothing is emitted until you configure what the site claims about the images it owns:

pushword:
  apps:
    - hosts: ['example.com']
      media_default_license_seed:
        license: 'https://example.com/legal'
        creditText: 'Example'
        creator:
          - name: 'Example'
            type: Organization

The seed is written into a media at upload time, never at render time — changing it later does not reach media already in the library. Re-run pw:media:license for those.

Two things to check if you have customized the admin or the templates:

  • admin_media_form_fields, if you override it, will not show the new License block. Copy the adminMediaLicenseBlockLabel entry from Pushword\Admin\DependencyInjection\Configuration::DEFAULT_ADMIN_MEDIA_FORM_FIELDS, and keep it last — a named block opens an accordion fieldset that swallows every field declared after it.
  • @pwAdmin/form/page_form_theme.html.twig was renamed to admin_form_theme.html.twig (it was never page-specific, and the media form needs it too). Update any addFormTheme() call or form_theme tag pointing at the old path.

An overridden component/image.html.twig emits no structured data until you add {{ imageLicenseJsonLd(image) }} to it.