Preparing search index...

    Function downloadImageToCache

    • Downloads an image from a remote URL to the app cache directory.

      Used for downloading recipe images from scraped websites. The image is stored in the cache directory with a unique filename based on timestamp.

      Parameters

      • remoteUrl: string

        HTTP/HTTPS URL of the image to download

      Returns Promise<string>

      Promise resolving to the local cache URI, or empty string on failure

      const localUri = await downloadImageToCache('https://example.com/recipe.jpg');
      if (localUri) {
      // Use localUri for recipe image
      }