.font(.system(size: 24)) for precise pixel control or .imageScale(.large) for semantic sizing relative to the current font. Both modifiers apply to Image(systemName:) views.Why this happens
SF Symbols are vector-based glyphs designed to work alongside Apple’s system fonts. Unlike raster images, they don’t have an intrinsic pixel size. Instead, they inherit sizing behavior from the text system. When you create Image(systemName:) without explicit sizing, SwiftUI renders the symbol at the surrounding view’s default font size — typically 17 points for body text.
Many developers expect .frame(width:height:) or .resizable() to work as they do with Image("assetName"). Those modifiers affect the layout frame, not the glyph’s drawing size. The symbol stays at its font-determined size while the frame expands around it, often leaving extra padding.
SwiftUI provides two distinct pathways to control symbol size: the font system (exact point sizes) and the semantic imageScale (relative steps). Choosing the right one depends on whether you need pixel-perfect dimensions or automatic adaptation to Dynamic Type.
How to fix it
1. Use .font() for exact point sizes
The most direct way to set a symbol’s size is to treat it like text. Apply any Font value — system, custom, or dynamic — and the symbol scales accordingly.
Image(systemName: "magnifyingglass")
.font(.system(size: 28, weight: .medium))
You can also use dynamic type styles so the symbol respects the user’s text-size setting:
Image(systemName: "heart.fill")
.font(.title2) // ~22 pt at default
.foregroundStyle(.red)
When to use this: Toolbar icons, custom tab-bar items, or any place you need a specific pixel dimension that must stay consistent across devices.
2. Use .imageScale() for semantic sizing
imageScale applies a multiplier relative to the current font size. It has three cases: .small (0.8×), .medium (1.0×, default), and .large (1.25×). Because it’s relative, the symbol automatically grows or shrinks when the surrounding text size changes — for example, inside a List row that adopts .body vs .caption.
VStack {
Image(systemName: "chevron.right")
.imageScale(.small)
Image(systemName: "chevron.right")
.imageScale(.medium)
Image(systemName: "chevron.right")
.imageScale(.large)
}
.font(.body) // all three scale together when body size changes
When to use this: Inline symbols inside text-heavy views, list accessories, or anywhere you want the icon to feel like part of the typography.
3. Combine both for maximum control
You can stack the modifiers: set a base font, then nudge with imageScale. The scale multiplies the font’s point size.
Image(systemName: "slider.horizontal.3")
.font(.system(size: 20))
.imageScale(.large) // effective size = 20 × 1.25 = 25 pt
This pattern is handy when a design system defines a base icon size but certain contexts need a subtle bump without switching to a new font token.
4. Avoid .resizable() and .frame() alone
// ❌ Doesn't enlarge the glyph
Image(systemName: "star")
.resizable()
.frame(width: 44, height: 44)
The symbol remains at the default font size (17 pt) centered in a 44×44 transparent box. If you must use a frame — for hit-testing or layout — pair it with a font:
// ✅ Glyph is 28 pt, frame is 44 pt for touch target
Image(systemName: "star")
.font(.system(size: 28))
.frame(width: 44, height: 44)
How to prevent it
- Default to
.font(.system(size:))for fixed-size icons; it’s the most predictable. - Use
.imageScale()when the icon lives inside text that may change size (Dynamic Type, different text styles). - Never rely on
.frame()or.resizable()alone to size SF Symbols. - Test with Dynamic Type enabled (Settings → Accessibility → Display & Text Size → Larger Text) to verify scaling behavior.
- Define a small set of icon size tokens in your design system (e.g.,
IconSize.small = 16,IconSize.medium = 24,IconSize.large = 32) and apply them via a view extension.
FAQ
Why does my SF Symbol look blurry when I make it large?
SF Symbols are vector glyphs, so they shouldn’t rasterize poorly. Blurriness usually means the view is being scaled by a parent .scaleEffect() or rendered in a non-integer point size. Ensure the final font size is a whole number and avoid fractional scaling on the symbol’s container.
Can I animate between two symbol sizes?
Yes. Wrap the font change in withAnimation:
withAnimation(.easeInOut(duration: 0.2)) {
iconSize = isExpanded ? 32 : 20
}
// …
Image(systemName: "chevron.down")
.font(.system(size: iconSize))
The symbol interpolates smoothly because Font is animatable in SwiftUI.
Does imageScale work with custom fonts?
imageScale only affects SF Symbols rendered through Image(systemName:). Custom icon fonts loaded via Font.custom ignore imageScale; use .font(.custom(..., size:)) directly for those.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.