It looks like the API is returning the correct image URLs, but your React app isn’t processing them properly. Here are a few things to check:
Test the API Response – Open the image URLs in a browser or check them in Postman to make sure they load correctly.
Fix Data Mapping – In Strapi v4, images are usually inside attributes. Try updating your code:
const images = property.attributes?.images?.data?.map(img => ${apiUrl}${img.attributes.url}
) || [];
Check CORS Issues – If images won’t load, check the browser console for CORS errors. Update Strapi’s middlewares.js to allow requests from your frontend. Clear Cache – If the issue persists, clear your Vite cache:
rm -rf .vite && rm -rf node_modules/.vite
npm run dev
Try these steps and let me know if you’re still stuck! 🚀