[GH-ISSUE #264] question about query parameters #121

Closed
opened 2026-02-25 22:34:24 +03:00 by kerem · 2 comments
Owner

Originally created by @rafipiccolo on GitHub (Dec 11, 2020).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/264

Hello all, I have a pure question, not a bug.

Is there any technical reason for not using query parameters to pass settings ? Is it only a cosmetic choice ?

i mean this :
https://www.myservice.io/upload/w_333,h_333,q_90/https://m0.cl/t/butterfly-3000.jpg

could have been :
https://www.myservice.io/generate?w=333&h=333&q=90&src=https://m0.cl/t/butterfly-3000.jpg

Originally created by @rafipiccolo on GitHub (Dec 11, 2020). Original GitHub issue: https://github.com/flyimg/flyimg/issues/264 Hello all, I have a pure question, not a bug. Is there any technical reason for not using query parameters to pass settings ? Is it only a cosmetic choice ? i mean this : https://www.myservice.io/upload/w_333,h_333,q_90/https://m0.cl/t/butterfly-3000.jpg could have been : https://www.myservice.io/generate?w=333&h=333&q=90&src=https://m0.cl/t/butterfly-3000.jpg
kerem closed this issue 2026-02-25 22:34:24 +03:00
Author
Owner

@sadok-f commented on GitHub (Dec 14, 2020):

Hi @rafipiccolo ,

Thank you for your question.

isn't only a cosmetic choice but also technical, the upload route composed of 2 parameters:

  • options which is the list of options to pass to the image processor handler, in your example it is w_333,h_333,q_90
  • imageSrc which is the URL to the source image https://m0.cl/t/butterfly-3000.jpg

Passing the whole options as one parameter (with customized delimiter) make it easier to manipulate those options and merge them with their default values as well.

If you have a special use case why do you need such a route, please provide us with more information.

Thank you again!

Best,
Sadok

<!-- gh-comment-id:744341840 --> @sadok-f commented on GitHub (Dec 14, 2020): Hi @rafipiccolo , Thank you for your question. isn't only a cosmetic choice but also technical, the upload route composed of 2 parameters: - `options` which is the list of options to pass to the image processor handler, in your example it is `w_333,h_333,q_90` - `imageSrc` which is the URL to the source image `https://m0.cl/t/butterfly-3000.jpg` Passing the whole options as one parameter (with customized delimiter) make it easier to manipulate those options and merge them with their default values as well. If you have a special use case why do you need such a route, please provide us with more information. Thank you again! Best, Sadok
Author
Owner

@rafipiccolo commented on GitHub (Dec 14, 2020):

Okay i see it has some advantages : smaller url, ez parsing.
Thanks for the reply,

<!-- gh-comment-id:744363983 --> @rafipiccolo commented on GitHub (Dec 14, 2020): Okay i see it has some advantages : smaller url, ez parsing. Thanks for the reply,
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#121
No description provided.