I have this component called SearchBarScreen :
import React, { useEffect } from "react";
import "./index.scss";
export const SearchBarScreen = (props) => {
  return (
    <>
      <img src="./assets/img/logo.png" className="nav_logo" alt="logo mercadolibre" />
    </>
  );
};
and my project has this structure:
depending on where I call this component, the image can be broken.
for example in the previous image it can be seen under the folder src/components/items/components, where it is called SearchBarScreen. For example, the image is shown broken on ItemDetailScreen but not on ItemScreen.
I always call it the same way in both components:
return (
  <>
    <SearchBarScreen props={props} />
  </>
);
In ItemDetailScreen
In ItemDetailScreen


