<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath" -->

---
title: Working with Images Using Foundation Models | daily.dev
description: A tutorial demonstrates how Apple's Foundation Models framework, starting with iOS 27, can process images as part of prompts rather than just text. Using an...
canonical: https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Working with Images Using Foundation Models | daily.dev
og:description: A tutorial demonstrates how Apple's Foundation Models framework, starting with iOS 27, can process images as part of prompts rather than just text. Using an...
og:url: https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath
og:image: https://api.daily.dev/og/posts/7j2tFzath.png
og:image:alt: Working with Images Using Foundation Models
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Working with Images Using Foundation Models

**[AzamSharp](https://daily.dev/sources/azamsharp)** · 11 min read · 3 upvotes · 1 comments

## Summary

A tutorial demonstrates how Apple's Foundation Models framework, starting with iOS 27, can process images as part of prompts rather than just text. Using an example Plant Assistant app, it shows how to attach a UIImage via an Attachment object to a LanguageModelSession, generate structured @Generable responses (Plant, PlantAnswer), and continue a conversational session with follow-up questions about the identified plant without resending the image. It also contrasts this image understanding approach with traditional classification models like ResNet50 and MobileNet, noting the latter remain preferable for predictable, predefined-category classification tasks.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://azamsharp.com/2026/09/06/working-with-images-using-foundation-models.html>

## Questions this post answers

### How do I attach an image to a Foundation Models prompt in iOS to get a structured response?

Create a UIImage, wrap it in an Attachment, then pass both a text prompt and the attachment to session.respond(generating:) using a @Generable struct. For example, calling session.respond(generating: Plant.self) with the prompt "What plant is this?" plus the image attachment returns a structured Plant object with name and description fields instead of raw text.

_Developers building vision features into apps can track Foundation Models updates like this on daily.dev._

### Can I ask follow-up questions about an image without resending it to Apple's Foundation Models?

Yes, once an image has been provided in a LanguageModelSession, the conversation context retains it, so subsequent questions only need the text prompt, not the image again. Using session.streamResponse(to:generating:) with the same session lets you ask things like watering or sunlight needs for an already-identified plant without reattaching the photo.

_daily.dev helps developers keep up with conversational AI session patterns like this one._

### What is the difference between image recognition models like ResNet50 and Apple's Foundation Models for image understanding?

Image recognition models such as ResNet50 or MobileNet classify images into a fixed, predefined set of categories, returning a single label like "cat." Foundation Models instead let you attach an image to a natural language prompt and ask open-ended questions about it, such as what an object is doing or where it is located, making them better suited when the possible questions aren't known in advance.

_Comparing vision approaches like this is easier when daily.dev surfaces relevant AI and iOS developments._

## Community discussion

Top comments from developers on daily.dev.

**@mark\_kazakov** · 0 upvotes

> Nice, having image processing locally is very useful.

## Similar posts on daily.dev

- [Building AI features using Foundation Models. Multimodal input.](https://daily.dev/posts/building-ai-features-using-foundation-models-multimodal-input--rspctzfvk) · Swift with Majid · 0 upvotes · 0 comments
- [How to Use Apple’s Foundation Models in a Web App with a macOS Companion](https://daily.dev/posts/how-to-use-apple-s-foundation-models-in-a-web-app-with-a-macos-companion-meb39q1kw) · freeCodeCamp · 1 upvotes · 0 comments
- [When to Use Apple Foundation Models on Mobile](https://daily.dev/posts/when-to-use-apple-foundation-models-on-mobile-nuyxlcjm5) · Callstack Blog · 1 upvotes · 0 comments
- [Apple’s Foundation Models and Why They’re Different From Other AI Providers](https://daily.dev/posts/apple-s-foundation-models-and-why-they-re-different-from-other-ai-providers-2gck4h5yv) · Medium · 1 upvotes · 0 comments

---

Tags: [#ai](https://daily.dev/tags/ai), [#apple](https://daily.dev/tags/apple), [#ios](https://daily.dev/tags/ios), [#swiftui](https://daily.dev/tags/swiftui), [#multimodal](https://daily.dev/tags/multimodal)

[View this post on daily.dev](https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Working with Images Using Foundation Models","url":"https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath"},"datePublished":"2026-09-07T03:11:06.504Z","dateModified":"2026-09-14T07:33:15.629Z","description":"A tutorial demonstrates how Apple's Foundation Models framework, starting with iOS 27, can process images as part of prompts rather than just text. Using an...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"AzamSharp","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AzamSharp","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/azamsharp"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"ai,apple,ios,swiftui,multimodal","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AzamSharp","item":"https://daily.dev/sources/azamsharp"},{"@type":"ListItem","position":3,"name":"Working with Images Using Foundation Models"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath","comment":[{"@type":"Comment","text":"Nice, having image processing locally is very useful.","datePublished":"2026-09-08T14:50:29.887Z","url":"https://daily.dev/posts/7j2tFzath#c-sKhchbZpw","author":{"@type":"Person","name":"Mark Kazakov","url":"https://daily.dev/mark_kazakov","image":"https://media.daily.dev/image/upload/s--xbUWQzIM--/f_auto/v1743106084/avatars/avatar_DXWhIjQxKsp3WABroh08k"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/working-with-images-using-foundation-models-7j2tfzath#faq","mainEntity":[{"@type":"Question","name":"How do I attach an image to a Foundation Models prompt in iOS to get a structured response?","acceptedAnswer":{"@type":"Answer","text":"Create a UIImage, wrap it in an Attachment, then pass both a text prompt and the attachment to session.respond(generating:) using a @Generable struct. For example, calling session.respond(generating: Plant.self) with the prompt \"What plant is this?\" plus the image attachment returns a structured Plant object with name and description fields instead of raw text. Developers building vision features into apps can track Foundation Models updates like this on daily.dev."}},{"@type":"Question","name":"Can I ask follow-up questions about an image without resending it to Apple's Foundation Models?","acceptedAnswer":{"@type":"Answer","text":"Yes, once an image has been provided in a LanguageModelSession, the conversation context retains it, so subsequent questions only need the text prompt, not the image again. Using session.streamResponse(to:generating:) with the same session lets you ask things like watering or sunlight needs for an already-identified plant without reattaching the photo. daily.dev helps developers keep up with conversational AI session patterns like this one."}},{"@type":"Question","name":"What is the difference between image recognition models like ResNet50 and Apple's Foundation Models for image understanding?","acceptedAnswer":{"@type":"Answer","text":"Image recognition models such as ResNet50 or MobileNet classify images into a fixed, predefined set of categories, returning a single label like \"cat.\" Foundation Models instead let you attach an image to a natural language prompt and ask open-ended questions about it, such as what an object is doing or where it is located, making them better suited when the possible questions aren't known in advance. Comparing vision approaches like this is easier when daily.dev surfaces relevant AI and iOS developments."}}]}
```

