Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EddyLB opened this issue Apr 19, 2024 · 2 comments
Open

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

EddyLB opened this issue Apr 19, 2024 · 2 comments

Comments

@EddyLB
Copy link
Contributor

EddyLB commented Apr 19, 2024

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.

@klaoun
Copy link

klaoun commented Apr 20, 2024

Hello
Try add plugin rotateImage and test it

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

@EddyLB
Copy link
Contributor Author

EddyLB commented Apr 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants