Skip to content

Issue in importing images from CSS.  #7

@vigneshshanmugam

Description

@vigneshshanmugam

When we import images in CSS like this

.bgImage {
    background-image: url('example.png');
    width: 200px;
    height: 200px;
}

Since the CSS will already be in webpack publicPath folder, the image request for example.png will be

http://localhost:3000/public/public/example-f1df98cf.png

This happens because of this line https://github.com/boopathi/image-size-loader/blob/master/index.js#L18. We need to remove webpack_public_path on toString method to fix this.

Check this #6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions