Skip to content

feat(image): add image via.placeholder provider#1186

Merged
Shinigami92 merged 22 commits intofaker-js:mainfrom
Devdre1909:feat/image-placeholder
Aug 8, 2022
Merged

feat(image): add image via.placeholder provider#1186
Shinigami92 merged 22 commits intofaker-js:mainfrom
Devdre1909:feat/image-placeholder

Conversation

@Devdre1909
Copy link
Copy Markdown
Contributor

@Devdre1909 Devdre1909 commented Jul 24, 2022

Issue #1111
Add support for https://placeholder.com/

width, height, text, format, background color, and text color supported

@Devdre1909 Devdre1909 requested a review from a team as a code owner July 24, 2022 10:42
@xDivisionByZerox xDivisionByZerox added c: feature Request for new feature p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Jul 24, 2022
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 24, 2022

Codecov Report

Merging #1186 (5dbb164) into main (7372e9a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 5dbb164 differs from pull request most recent head ec77e3b. Consider uploading reports for the commit ec77e3b to get more accurate results

@@           Coverage Diff            @@
##             main    #1186    +/-   ##
========================================
  Coverage   99.63%   99.63%            
========================================
  Files        2155     2156     +1     
  Lines      236884   236988   +104     
  Branches      994     1007    +13     
========================================
+ Hits       236020   236124   +104     
  Misses        843      843            
  Partials       21       21            
Impacted Files Coverage Δ
src/modules/image/index.ts 100.00% <100.00%> (ø)
src/modules/image/providers/placeholder.ts 100.00% <100.00%> (ø)

Copy link
Copy Markdown
Member

@ejcheng ejcheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should specify that width and height are in pixels.

Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
- include . after jsdoc comments
- specifiy that width and height is in pixels
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread test/image.spec.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts
Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts
Devdre1909 and others added 5 commits July 27, 2022 18:13
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
Co-authored-by: ST-DDT <ST-DDT@gmx.de>
@xDivisionByZerox xDivisionByZerox added the m: image Something is referring to the image module label Jul 28, 2022
Comment thread src/modules/image/providers/placeholder.ts
Comment thread src/modules/image/providers/placeholder.ts Outdated
@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Jul 29, 2022

Please update the tests so the dont fail anymore.

Comment thread src/modules/image/providers/placeholder.ts Outdated
Comment thread src/modules/image/providers/placeholder.ts
@Shinigami92 Shinigami92 added this to the v7 - Current Major milestone Jul 30, 2022
@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Aug 5, 2022

@Devdre1909 May I go ahead and fix these things to get this merged or do you wish to do this yourselves?

@Devdre1909
Copy link
Copy Markdown
Contributor Author

@Devdre1909 May I go ahead and fix these things to get this merged or do you wish to do this yourselves?

I will.
Thank you.

@Shinigami92 Shinigami92 changed the title feat(image): Add Image placeholder module feat(image): add image via.placeholder provider Aug 8, 2022
@Shinigami92 Shinigami92 enabled auto-merge (squash) August 8, 2022 14:39
@Shinigami92 Shinigami92 disabled auto-merge August 8, 2022 14:46
@lk77
Copy link
Copy Markdown

lk77 commented Oct 7, 2024

Issue #1111 Add support for https://placeholder.com/

width, height, text, format, background color, and text color supported

Hi @Devdre1909 ,

it seems to me that site does not exist anymore

@matthewmayer
Copy link
Copy Markdown
Contributor

See #2477

While the homepage of the site now promotes am unrelated business the images appear to continue to work for now.

@carusoray
Copy link
Copy Markdown

It seems that the via.placeholder.com images API is not longer active. placeholder.com is still alive; however, via.placeholder.com does not resolve. Image URL within the test JSON are no longer valid.

@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Jan 13, 2025

Thanks for the report. We have deprecated it:

The deprecation will be released in a few days.

As a workaround, you can use:

proposed: 'faker.image.url() or faker.image.dataUri()',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature m: image Something is referring to the image module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

9 participants