[API] pwg.image.rotate not returning sizes and thumbnail URLs #1869

Open
opened 2026-10-05 00:59:15 +02:00 by adam · 2 comments
Owner

The pwg.image.rotate API method deletes representatives and updates their URLs in the database so that the server knows that it should recreate them. In principle, URLs of the type: https://…/_data/i/upload/2024/02/17… are replaced with https://…/i.php?/upload/2024/02/17…. But is this always the case?

When called, pwg.image.rotate returns the JSON {"stat":"ok","result":true} after successfully rotating a photo. This JSON does not contain the modified sizes, nor the new URLs.

A third party app calling pwg.image.rotate obviously knows how the width and height have been changed and how to rotate thumbnails already in cache. But it may not know the URL of thumbnails not yet in cache unless it reloads all image data by calling pwg.images.getInfo to retrieve all addresses.

To reduce network accesses (battery consumption) and speed up third party apps, I would like that pwg.image.rotate also returns the width, height and URL of all thumbnails.

The `pwg.image.rotate` API method deletes representatives and updates their URLs in the database so that the server knows that it should recreate them. In principle, URLs of the type: `https://…/_data/i/upload/2024/02/17…` are replaced with `https://…/i.php?/upload/2024/02/17…`. But is this always the case? When called, `pwg.image.rotate` returns the JSON {"stat":"ok","result":true} after successfully rotating a photo. This JSON does not contain the modified sizes, nor the new URLs. A third party app calling `pwg.image.rotate` obviously knows how the width and height have been changed and how to rotate thumbnails already in cache. But it may not know the URL of thumbnails not yet in cache unless it reloads all image data by calling `pwg.images.getInfo` to retrieve all addresses. To reduce network accesses (battery consumption) and speed up third party apps, I would like that `pwg.image.rotate` also returns the width, height and URL of all thumbnails. <!-- github-sync-id:2252559318 -->
Author
Owner

Hello
Try add plugin rotateImage and test it

I look this
https://www.php.net/manual/fr/function.imagerotate.php

Hello Try add plugin rotateImage and test it I look this https://www.php.net/manual/fr/function.imagerotate.php <!-- github-comment-id:2067504289 -->
Author
Owner

The mentioned error is encountered with the version 11.0.a of the rotateImage plugin.

The mentioned error is encountered with the version 11.0.a of the [rotateImage plugin](https://piwigo.org/ext/extension_view.php?eid=578). <!-- github-comment-id:2068133032 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1869