`'s `srcset` attribute media, use the previously unvaried map of "intrinsic width"
10 | - You should use the first image in the `
`'s `src` attribute, which is for legacy browsers (IE) only
11 |
12 | (loop until the table ends)
13 |
14 | ```html
15 |
16 |
17 |
18 |
19 | ```
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "responsive-images-automator",
3 | "version": "4.4.0",
4 | "description": "Automate the analysis of your image dimensions, automate the generation of responsive images HTML code, test the outcome",
5 | "main": "index.js",
6 | "scripts": {
7 | "extract": "node ./bin/extract.js",
8 | "start": "node ./bin/server.js",
9 | "start:dev": "nodemon ./bin/server.js",
10 | "build:tests": "node ./bin/build-tests.js",
11 | "test": "jest",
12 | "test:dev": "jest --watchAll",
13 | "xls": "node ./bin/excel.js"
14 | },
15 | "keywords": [],
16 | "author": "",
17 | "license": "ISC",
18 | "dependencies": {
19 | "ejs": "^3.1.6",
20 | "exceljs": "^4.3.0",
21 | "express": "^4.17.1",
22 | "jest": "^27.5.1",
23 | "jest-puppeteer": "^6.1.0",
24 | "mustache": "^4.2.0",
25 | "probe-image-size": "^7.2.3",
26 | "puppeteer": "^13.3.1"
27 | },
28 | "jest": {
29 | "preset": "jest-puppeteer",
30 | "verbose": true,
31 | "moduleFileExtensions": [
32 | "js",
33 | "ejs"
34 | ],
35 | "testPathIgnorePatterns": [
36 | "factory",
37 | "examples"
38 | ]
39 | },
40 | "type": "module",
41 | "devDependencies": {
42 | "nodemon": "^2.0.14"
43 | },
44 | "funding": {
45 | "type": "individual",
46 | "url": "https://ko-fi.com/verlok"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/views/capped.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | <%= pageTitle %>
8 |
12 |
19 |
20 |
21 |
22 | <%= pageTitle %>
23 | Rendered image
24 | <% if (image.mediaQueries.length === 0) { %>
25 |
30 | <% } else { %>
31 |
32 | <% image.mediaQueries.forEach((mqObject) => { %>
33 |
38 | <% }) %>
39 |
44 |
45 | <% } %>
46 |
47 | HTML code
48 |
49 |
50 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/views/notFound.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Not found: <%= imageName %>
8 |
9 |
10 |
11 | Not found: <%= imageName %>
12 | There's no such image named <%= imageName %>
in the configuration file.
13 | Please double check.
14 |
15 |
16 |
--------------------------------------------------------------------------------
/views/uncapped.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | <%= pageTitle %>
8 |
12 |
19 |
20 |
21 |
22 | <%= pageTitle %>
23 |
24 | Rendered image
25 |
31 |
32 | HTML code
33 |
34 |
35 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------