[GH-ISSUE #561] Gravity value is ignored and crop always uses West #204

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

Originally created by @nonoesp on GitHub (Jan 31, 2025).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/561

Originally assigned to: @sadok-f on GitHub.

Hi, all!

Thanks so much for open-sourcing this project. ❤️

I would love to go without Imgix, and Flyimg seems the way to go.


Describe the bug
Regardless of the gravity value provided, crop is always applied using West.

To Reproduce
Set the following parameters.

  • crop to 1
  • width to 500
  • height to 500
  • gravity to Center

https://demo.flyimg.io/upload/q_90,c_1,g_Center,w_500,h_500,rf_1/https://mudawn.com/assets/butterfly-3000.jpg

Expected behavior
Center crop of the image.


Flyimg output


Screenshots

Image

Environment setup:


Cheers, =)

Nono

Originally created by @nonoesp on GitHub (Jan 31, 2025). Original GitHub issue: https://github.com/flyimg/flyimg/issues/561 Originally assigned to: @sadok-f on GitHub. Hi, all! Thanks so much for open-sourcing this project. ❤️ I would love to go without Imgix, and Flyimg seems the way to go. --- **Describe the bug** Regardless of the `gravity` value provided, `crop` is always applied using `West`. **To Reproduce** Set the following parameters. - `crop` to `1` - `width` to `500` - `height` to `500` - `gravity` to `Center` <https://demo.flyimg.io/upload/q_90,c_1,g_Center,w_500,h_500,rf_1/https://mudawn.com/assets/butterfly-3000.jpg> **Expected behavior** Center crop of the image. <img src="https://github.com/user-attachments/assets/c6ad8e77-b136-4f85-8ab1-108d5db5a79d" width="300"/> <br/> <img src="https://github.com/user-attachments/assets/429a22f0-0cce-4c98-a278-00f34af3a947" height="300"/> **Flyimg output** <img src="https://demo.flyimg.io/upload/q_90,c_1,g_Center,w_500,h_500,rf_1/https://mudawn.com/assets/butterfly-3000.jpg" width="300"/> <br/> <img src="https://github.com/user-attachments/assets/6a6826f9-00c3-4149-9fb2-75e770ef0b3d" height="300"/> **Screenshots** <img width="671" alt="Image" src="https://github.com/user-attachments/assets/ea1509bd-2dc1-48b2-baaf-65090ce00985" /> **Environment setup:** - Flyimg version: Demo environment at https://demo.flyimg.io/ and Docker image running locally without changes. --- Cheers, =) Nono
kerem 2026-02-25 22:34:36 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@sadok-f commented on GitHub (Jan 31, 2025):

Hi @nonoesp
many thanks for opening this issue!
I'll check it out and get back to you!

<!-- gh-comment-id:2627411371 --> @sadok-f commented on GitHub (Jan 31, 2025): Hi @nonoesp many thanks for opening this issue! I'll check it out and get back to you!
Author
Owner

@sadok-f commented on GitHub (Jan 31, 2025):

@nonoesp it seems the gravity option was ignored because of the order of other arguments.
this should be fixed in the latest release https://github.com/flyimg/flyimg/releases/tag/1.7.2
Please give it a try.
Thank you!

<!-- gh-comment-id:2628130964 --> @sadok-f commented on GitHub (Jan 31, 2025): @nonoesp it seems the gravity option was ignored because of the order of other arguments. this should be fixed in the latest release https://github.com/flyimg/flyimg/releases/tag/1.7.2 Please give it a try. Thank you!
Author
Owner

@nonoesp commented on GitHub (Feb 3, 2025):

Thanks for fixing this so fast! I verified that it works as expected now. 🙃

<!-- gh-comment-id:2630853761 --> @nonoesp commented on GitHub (Feb 3, 2025): Thanks for fixing this so fast! I verified that it works as expected now. 🙃
Author
Owner

@sadok-f commented on GitHub (Feb 3, 2025):

@nonoesp thank you for confirming!
Happy Flyimging 😀!

<!-- gh-comment-id:2631353539 --> @sadok-f commented on GitHub (Feb 3, 2025): @nonoesp thank you for confirming! Happy Flyimging 😀!
Author
Owner

@sadok-f commented on GitHub (Apr 28, 2025):

Hi @nonoesp,
If your company/organisation is using Flyimg, it would be great to have you listed in our ADOPTERS.md file!
Feel free to add your entry — we'd love to highlight your support.
Thank you!

<!-- gh-comment-id:2834532417 --> @sadok-f commented on GitHub (Apr 28, 2025): Hi @nonoesp, If your company/organisation is using Flyimg, it would be great to have you listed in our [ADOPTERS.md file](https://github.com/flyimg/flyimg/blob/main/ADOPTERS.md)! Feel free to add your entry — we'd love to highlight your support. Thank you!
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#204
No description provided.