Problem/Motivation
Beluga regenerated all AV Portal photos into new resolutions and moved them to a new endpoint. The legacy photo files will be deleted, so consumers must sync. The module currently targets the legacy base path and always serves the HIGH tag, which has been redefined to a capped 1200x1200.
Tag Dimensions Note
ORIGINAL 3500x2334 true max (new tag)
HIGH 1200x800 was original-max, now capped
MED 800x533
LOW 400x266
THUMB 200x133
1. New base path: config/install/media_avportal.settings.yml
# NO trailing slash — PATH values now start with "/"
photos_base_uri: "https://ec.europa.eu/avservices/repository/photo"
2. Config migration: add a post_update in media_avportal.post_update.php to overwrite photos_base_uri on already-installed sites (config install default only applies to fresh installs).
3. Prefer ORIGINAL for the full/display image: AvPortalResource::getPhotoUri() (AvPortalResource.php:62)
return $this->data['media_json']['ORIGINAL']['PATH']
?? $this->data['media_json']['HIGH']['PATH']
?? '';Restores true max-resolution as the source for image-style derivatives (the embed_*_2x styles request up to 2216px; a 1200px HIGH would under-feed them).
4. Update the test mock: tests/modules/media_avportal_mock/
Rewrite photo fixture JSON to the new shape (add ORIGINAL, leading-slash PATHs).
Update the middleware path match at AvPortalClientMiddleware.php:81 from avservices/avs/files/video6/repository/prod/photo/store/ to avservices/repository/photo.
Issue fork media_avportal-3614975
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
joevagyok commentedComment #4
joevagyok commentedComment #5
alexandra22 commentedAll good.
Comment #7
hernani commented