Summary
This post describes how to save a clickable link in a Google sheet that will open an image captured through your app. The link created is a Google Drive link, so permissions are based on Google Drive settings. It does not require an anonymously accessible link via AppSheet.
Related topics and limitations
This help article describes how to construct an image url using AppSheet. However, it is only appropriate for non-sensitive content because the links can be accessed anonymously.
This example uses a different approach. When the user adds a record, it triggers an Apps Script function to get the Drive url of the image file and write it back to the sheet
Template and Demo
A few notes:
Description
This a simple example of how to use an Apps Script function to capture the url of a file saved into Drive and write the url back to the app's data source. This supports use cases where people need to access saved photos through the Sheet directly.
Access Permissions
Typically, access permissions for content related to AppSheet apps are controlled through AppSheet. This use case is a bit different. Users are accessing these links directly in the Google sheet rather than through AppSheet. Therefore, access permissions are controlled through Drive. One way to manage this is to grant access to the parent folder of the images. Then anyone with that permission could click any link in the Google sheet and open the image.
In case it's relevant or otherwise of interest to anyone: It's also possible to use Apps Script to set the user permissions for a folder or file in Drive. I've found this handy for managing permissions for files that are needed by the users of an AppSheet app but that are not accessed via AppSheet.