greeting
am finish "solidity path from cryptozombies course" and watch numbers of video tutorials, but can not find how i can make the contract read image from folder in project root directory.
1- there's "x" number of images files that stored in folder called images in project root directory.
2- try create function that will go to folder in project root directory, let's assume it called "images". then convert them to base64.
3- next function do what i mention above, but i can not find how direct it to this specific folder that called "images" to read from it the images?
function svgToImageURI(string memory svg) public pure returns (string memory) {
string memory baseURL = "data:image/svg+xml;base64,";
string memory svgBase64Encoded = Base64.encode(bytes(string(abi.encodePacked(svg))));
return string(abi.encodePacked(baseURL,svgBase64Encoded));
}
thanks in advance.