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

Feature Request: Image Outline #134

Open
garycarlyle opened this issue May 23, 2018 · 8 comments
Open

Feature Request: Image Outline #134

garycarlyle opened this issue May 23, 2018 · 8 comments
Assignees
Labels
enhancement New feature or request triage This issue is being investigated

Comments

@garycarlyle
Copy link

Hi,

Just a feature request.

I think it would be really useful to have a coloured border. Would be a nice dynamic feature.

Great coding. :)

@andrieslouw andrieslouw added enhancement New feature or request triage This issue is being investigated labels May 26, 2018
@andrieslouw
Copy link
Member

@kleisauke : Maybe add something like &border=9 for 9 pixels of border, or &border=9,6 where 9 is top/bottom and 6 is left/right (like CSS).

I think it would just add to the image dimension? So &w=300 with &border=9 would be 318 pixels wide.

@AnandChowdhary
Copy link

This is a slippery slope, then you'll want a param &boxSizing=borderBox to ensure that w=300 with a border=9 stays 300 (sarcasm, don't worry.)

I think for most implementations of the API, CSS (web) or native-level borders (native) can be added by users; blurring, masking, etc., are great image serving CDN but I think borders might be going overboard. Next feature request will be shadows, otherwise. 👐

@andrieslouw
Copy link
Member

That's true, let's give it some consideration. @garycarlyle : What would be the user case? Could you give an example of the result you'd like? For solid borders CSS seems to be more appropriate indeed.

@andrieslouw
Copy link
Member

Taking another look, and I still agree with @AnandChowdhary on this issue. But if there are any compelling user cases, let us know, and we will reconsider this!

@andrieslouw andrieslouw added wontfix This will not be worked on and removed triage This issue is being investigated labels Dec 13, 2018
@skalee
Copy link

skalee commented Jun 28, 2020

Borders are very practical, particularly when dealing with screen shots, and they cannot be compared to shadows or other fancy things. I am really missing this feature.

A typical use case is posting screen shots on bulletin boards. If bulletin board background and screen shot background are in the same colour (very often both are white), you really want to add some border in order to separate posted picture from the rest of your post. And if you are a common user on a bulletin board, you probably cannot tweak with CSS.

Yes, there are alternatives. For example, one can make a table with a single cell just to have a border around that cell. But on some bulletin boards tables may be unavailable, on some others they may be borderless, and on some others simply cumbersome in use. Even if you cannot use tables, you can always download a screenshot, add a border in some image editor, and re-upload it to a hosting service. Yes, that would work, but I thought avoiding it is one of the goals of this project.

I've provided a use case. Hence, I suggest re-opening this issue.

Regarding what new parameters are needed, border colour is enough for my use case. Border thickness is not critical, but won't hurt either, especially that users will surely look for it in docs. My suggestion is to support only these two options. Obviously, default setting should be no border. If border thickness is set but border colour is not, then it should be black. If border colour is set but thickness is not, then it should be 2px. Doesn't really matter if w=300 parameter would mean picture width including border or excluding it, but it would be good to document this.

@andrieslouw andrieslouw added triage This issue is being investigated and removed wontfix This will not be worked on labels Jun 28, 2020
@andrieslouw
Copy link
Member

Let's rediscuss this, as we now do have use cases.

@andrieslouw andrieslouw reopened this Jun 28, 2020
@garycarlyle
Copy link
Author

Sorry I have not logged into this account for ages. Was really cool of you to consider this. I think my use case was when using images on a website in a scenario that you would want border but would be more practical doing it with this rather than CSS. I cant remember why I would have liked that rather than CSS but I must of had a reason. :)
Actually @skalee seems to have covered what I think was on my mind at the time.

@mmcloughlin
Copy link

I'd be interested in this feature. I'm using weserv to generate circle GitHub avatars in a Github README, which is a case where I cannot use CSS (since Github strips it from <img> tags). It would be cute to include a light grey border around the circle mask, similar to how Github itself displays circle avatars.

Screenshot from 2022-04-24 13-02-47

https://github.com/mmcloughlin/avo#adopters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage This issue is being investigated
Development

No branches or pull requests

6 participants