EXIF-Loader
Extract EXIF- & size data from your JPGs during build-time.
Install
npm install --save-dev exif-size-loader
Usage
You can use the EXIF-loader as a standalone loader:
webpack.config.js
moduleexports = module: rules: test: /\.jpg$/ use: 'exif-size-loader'
modules/a.js
;
You can also use the load in tandem with the url-loader.
webpack.config.js
moduleexports = module: rules: test: /\.jpg$/ use: 'exif-size-loader' 'url-loader'
You can also use the load in tandem with the file-loader.
webpack.config.js
moduleexports = module: rules: test: /\.jpg$/ use: 'exif-size-loader' 'file-loader'
modules/b.js
; const imageWidth = exifimage; { return <figure> <img src=file width=imageWidth alt="" /> <figcaption>object_name</figcaption> </figure>;}