This error can occur when your app has the
pub/ directory as the root directory for the Magento installation. This is usually considered a good practice, but it has some drawbacks. The extension can’t know which directory is the root folder for Magento, so it always assume the base directory is your root folder.
The best way to handle this problem is to make your server ignore
/pub in the url.
If it’s not possible to change the server configuration, a setting is provided in Stores > Configuration > Algolia Search > Advanced > Remove /pub/ from image URLs. When this setting is changed, please reindex the catalog.