How to display a photo? Is there a mysql or mssql database, and how best to store photos in the image field or store a link to a photo that is stored on the server, if the link, how then to change / add a photo and upload it?

    1 answer 1

    Much depends on the size, number and frequency of access to the photo. You can store photos in a relational database, or you can store it in a NoSQL database, or in a file system or on special content delivery networks, and store paths to a photo in a database. Why should not be stored in the database?

    • Images can be served as static.
    • No database access is required to retrieve the image.
    • Images can be cached.

    Images are connected to WPF using the Image component, for example, for a URL

    <Image Source="{Binding Path=PhotoID, StringFormat='http://from.ru/Image.aspx?photoID={0}'}" />