I have a external js file named acf-map.js
and i want to use themap-pin.png
image inside the public folder,
var image = {
url: '/wp-content/themes/npr2023/public/images/map-pin.png',
// This marker is 19 pixels wide by 32 pixels high.
size: new google.maps.Size(19, 32),
// The origin for this image is (0, 0).
origin: new google.maps.Point(0, 0),
// The anchor for this image is the base of the flagpole at (0, 32).
anchor: new google.maps.Point(0, 32)
};
This throws an error, it cannot find the image url because image has a prefix after the build.