79794117

Date: 2025-10-19 06:24:40
Score: 1
Natty:
Report link

i found something related
it think its better to create public function to get URL

src/utils.js

export const getImageUrl = (filename) => {   return `${import.meta.env.VITE_API_BASE_URL}/images/${filename}` }

and in you component use this

:src="getImageUrl('whatever.jpg')"

and another way its setting base url as proxy detail on this answer
https://stackoverflow.com/a/74430384/19033492

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mohammad Nadr