How can a capacitor app choose what to display for an image based on its src attribute? Same for any URL-based resources
Not sure what you mean. Doing /myimage.png would pull from the root of your web project when compiled in Capacitor.
In a Capacitor app, image paths are relative to the web root. To display different images dynamically, use a function to return the correct path based on a condition. Store images in the assets folder. For URL-based images, assign the URL directly. On Android or iOS, use Capacitor.convertFileSrc() for local files to ensure they load correctly in production.