mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 01:35:56 +03:00
[GH-ISSUE #519] Save images in readable paths #795
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#795
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adiltibari on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/519
Originally assigned to: @sadok-f on GitHub.
Is there a way to make flyimg save images that are being optimized on a readable path?
so if the image url is :
https://cdn.test.com/upload/q_56/https://demo.net/storage/app/public/product/2024-07-03-6685bab14071f.png
it will save it to :
demo.net(folder)/storage(folder)/app(folder)/public(folder)/product(folder)/2024-07-03-6685bab14071f.png
@sadok-f commented on GitHub (Oct 2, 2024):
Thank you @adiltibari for opening this issue!
If I get you right, you want to change the location where the generated images are being stored?
if yes, is the new path a fixed path?
currently the images are stored in the
uploadfolder under the public folder web.if you want to change that, to a fixed path, you need to create the desired path:
and then change the
UPLOAD_WEB_DIRconstant to'storage/app/public/product/'in the constants.php fileto get the image path, you need to call the path endpoint.
example:
https://cdn.test.com/upload/q_56/https://demo.net/storage/app/public/product/2024-07-03-6685bab14071f.png
Call the path endpoint:
https://cdn.test.com/path/q_56/https://demo.net/storage/app/public/product/2024-07-03-6685bab14071f.png
the image is available under
https://cdn.test.com/storage/app/public/product/4eaf3878f10741f3cc1c9809131f961b.pngI hope I make it clear
@adiltibari commented on GitHub (Oct 8, 2024):
Hi, The new path is dynamic and depends on the domain name & the path of the image in that domain, the idea is to have the upload directory organized and easy to navigate.
@sadok-f commented on GitHub (Oct 10, 2024):
I see, unfortunately Flyimg doesn't support that.