# defaultimg

> A fun and easy to use library for setting default src for images without src

Latest version **1.0.1** (published 2017-12-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install defaultimg
pnpm add defaultimg
yarn add defaultimg
bun add defaultimg
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-12-09 |
| First published | 2017-12-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kamil Michna |
| Maintainers | kamilmichna |
| Keywords | img, src |

## Links

- npm: https://www.npmjs.com/package/defaultimg
- Repository: https://github.com/kamilmichna/defaultimg
- Homepage: https://github.com/kamilmichna/defaultimg#readme
- Issues: https://github.com/kamilmichna/defaultimg/issues
- npm.io page: https://npm.io/package/defaultimg

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-12-09
- 1.0.0 — 2017-12-09

## README

# Defaultimg library
Simple library for setting default src attribute for imgs.For example,to set 10 same photos, just create 10 img tags, and then use defaultimg to set them src and alt attributes.First, just link the `defaultimg.js` or `defaultimg.min.js` to your site.
You can done it by downloading from github repo: https://github.com/kamilmichna/defaultimg or from npm by `npm install defaultimg --save`.Then link it by script tage.

```
10 empty img tags
<script src='defaultimg.js'></script>
</body>
```
next, just use library to specify the src and alt.
```
10 empty img tags
<script src='defaultimg.js'></script>
<script> defaultimg.main('dino.jpeg','dinosaur image') </script>
</body>
```
`defaultimg.main()` function gets two arguments.First, a src to image , and second , alt for an image.

---
_Source: https://npm.io/package/defaultimg · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
