twopluszero / next-images

Import images in Next.js (supports jpg, jpeg, svg, png and gif images)
MIT License
950 stars 67 forks source link

Can I use/tweak this plugin to also load images from scss files? #7

Closed AmrAbdulrahman closed 6 years ago

AmrAbdulrahman commented 6 years ago

The plugin perfectly works for requiring/importing images in ReactComponents I just need it to work also for images in the styling files as following

.class {
  background-image: url('/images/hero/home.jpg');
}

Can this plugin be extended to handle this scenario as well?

arefaslani commented 6 years ago

AFAIK no. Because it uses JavaScript require to load images and only work in JavaScript files. Please let me know if you had any solution.