Affiliate Banner Sizes: Best Sizes, HTML5 Specs and Embed Codes

Which banner sizes to give affiliates, the IAB file-weight limits behind them, when HTML5 beats static images, how embed codes carry tracking, and creative rules for regulated verticals.

In this article
  1. Affiliate banner sizes at a glance
  2. Which banner sizes to produce first
  3. HTML5 vs static banners
  4. How affiliates embed banners
  5. Creative rules by vertical
  6. Banner kit checklist for brands
  7. Manage banners and embed codes in one place
  8. FAQ

The best affiliate banner sizes are the standard units publishers already have slots for: 300x250 (medium rectangle), 728x90 (leaderboard), 320x50 (smartphone banner), 160x600 (skyscraper), 300x600 (half page) and 970x250 (billboard). Supply each as a static image within IAB file-weight limits, and add HTML5 versions where your partners can host them.

This guide lists the standard sizes and their limits, which ones to produce first, how HTML5 and static banners differ, how embed codes carry tracking, and which creative rules apply in gambling, crypto and other regulated verticals. For the wider program setup, see what MassPartner offers brands.

Affiliate banner sizes at a glance

The reference for display sizes is the IAB Tech Lab's fixed-size ad specifications, part of its New Standard Ad Unit Portfolio. It recommends the units below with a maximum file weight for the initial load and for "subload", the extra weight an ad may load after the host page has finished loading.

IAB unit Size (px) Max initial load Max subload Where affiliates use it
Medium Rectangle 300x250 150 kB 300 kB In-article, sidebars, mobile content
Leaderboard 728x90 150 kB 300 kB Above content, forum headers
Smartphone Banner 320x50 or 300x50 50 kB 100 kB Mobile header or footer
Skyscraper 160x600 150 kB 300 kB Narrow desktop sidebars
Billboard 970x250 250 kB 500 kB Top of comparison and review pages
Super Leaderboard / Pushdown 970x90 200 kB 400 kB Wide desktop headers
Portrait 300x1050 250 kB 500 kB Long-form sidebars
Mobile Phone Interstitial 640x1136, 750x1334 or 1080x1920 300 kB 600 kB Full-screen mobile placements

Some popular sizes are missing from that fixed list. The 300x600 half page appears in the IAB's flexible sizing grid as an example unit with a 250 kB initial limit, and Google's AdSense guide to ad sizes names 300x250, 336x280, 728x90, 300x600 and 320x100 as its top-performing sizes. Affiliates who also run AdSense on their sites tend to have slots in exactly those dimensions.

Which banner sizes to produce first

You don't need every unit on day one. Start with the sizes that fit most placements, then add more when partners ask.

Kit Sizes Covers
Core 300x250, 728x90, 320x50, 300x600, 160x600 Most content sites, blogs and forums, desktop and mobile
Extended 336x280, 320x100, 970x250, 970x90, 300x1050 Review sites, comparison tables, wide layouts
On request Mobile interstitials, custom sizes for a partner's template Large partners with fixed placements

Example: a brand with three active offers that produces the core kit in two variants per offer uploads 30 banners (3 offers × 5 sizes × 2 variants). That is enough for partners to run a simple A/B test per placement and compare EPC by variant.

Design for high-density screens

The IAB spec calculates fixed-size units at double density (2x), so a 728x90 unit counts as 728 × 90 × 4 = 262,080 pixels. In practice, export artwork at twice the nominal size and display it at the nominal width and height, so text stays sharp on high-resolution phones and laptops.

Keep files light

The IAB's static-image guidance is simple: use the initial-load limit for the size, so a static 300x250 should stay within 150 kB. For 3G (1.5 Mbps) or slower connections, the spec says file weights should be 30% below the recommended limits. Lighter files also load before readers scroll past the slot.

HTML5 vs static banners

Static (JPG, PNG, WebP, GIF) HTML5
What it is One image file A mini web page: HTML, CSS, JavaScript and assets
Animation None, or animated GIF Smooth animation, interactivity, rotating offers
File weight One file within the initial-load limit Initial load plus subload, counted gzipped
Hosting Any site, email or forum that allows images Sites that accept iframes or scripts
Tracking Link wraps the image Exit must use the affiliate's tracking link
Production Quick to make and update Needs a designer or HTML5 tool, plus QA

The IAB spec sets behavior rules for HTML5 creatives: no more than ten file requests during the initial load, a 30% CPU-load ceiling per active ad, audio muted until the user starts it, and in-page banners that wait for the page's load event before animating. It also asks that ads be clearly distinguishable from editorial content, for example with a border.

If affiliates also buy display media, the ad network's specs apply on top. Google Ads' uploaded display ad specifications cap image ads at 150 KB, require animated GIFs to stop after 30 seconds and run slower than 5 frames per second, and limit HTML5 uploads to a ZIP of 600 KB or less with no more than 40 files. As of October 2026, Google also restricts HTML5 uploads to accounts that meet eligibility criteria, including more than $9,000 in lifetime spend.

When HTML5 is worth it

HTML5 pays off when the message needs motion: rotating odds, a countdown to an offer deadline, or a product carousel. For a single static offer, a well-designed image usually performs as well and works in more places, including email and forums. Always ship a static fallback with every HTML5 banner for partners who can't run scripts or iframes.

How affiliates embed banners

Every banner needs the affiliate's own tracking link, or the click can't be attributed. Platforms usually generate one of four snippets per banner and affiliate.

HTML image link, the most compatible option:

<a href="https://track.example.com/c/AFF123?sub1=sidebar&sub2=spring_offer" target="_blank" rel="sponsored noopener">
  <img src="https://cdn.example.com/banners/brand_spring_300x250.png" width="300" height="250" alt="Brand spring offer: 20% off annual plans">
</a>

iframe, common for HTML5 banners that must run isolated from the host page:

<iframe src="https://cdn.example.com/html5/brand_spring_300x250/index.html?aff=AFF123&sub1=sidebar"
        width="300" height="250" frameborder="0" scrolling="no"></iframe>

JavaScript tag, which lets the platform swap creatives without the affiliate editing the page, and direct link, for partners who host the image themselves or use text links.

Add sub IDs to the link so affiliates can see which placement converts; our sub ID tracking guide shows a naming scheme. Set explicit width and height on images so the page doesn't shift while the banner loads.

On MassPartner, brands upload banners to a per-campaign library as JPG, PNG, WebP or GIF images, or as HTML5 banners in a ZIP or a single HTML file. Approved affiliates copy ready-made HTML, iframe or JavaScript code, or a direct link, with sub1 to sub5 already filled in.

Creative rules by vertical

Banners are advertising, so the rules of each market apply to them, including when an affiliate displays them. Put these requirements in the artwork itself rather than relying on the host page.

Gambling

In Great Britain, the Gambling Commission's social responsibility code 5.1.6 requires licensees to comply with the advertising codes issued by the Committee of Advertising Practice. Section 16 of the CAP Code includes rules that ads must not:

  • be likely to be of strong appeal to children or young persons (rule 16.3.12);
  • feature anyone who is, or seems to be, under 25 gambling or playing a significant role, with narrow exceptions (rule 16.3.14);
  • suggest that gambling can be a solution to financial concerns (rule 16.3.4).

Show 18+ on every gambling banner, include the significant terms of any bonus you advertise, and follow the responsible-gambling messaging your license requires in each market.

Crypto and investments

In the UK, the FCA's rules for cryptoasset promotions require clear risk warnings and ads that are clear, fair and not misleading, and the FCA's announcement confirms that "refer a friend" bonuses are banned. A banner shown to UK consumers should never promise returns or advertise a sign-up bonus for referring friends. Check equivalent rules, such as MiCA in the EU, for every market you target.

Finance and fintech

Rates, fees and limits on a banner must match the current offer. Avoid "free" or "no fees" unless that is true without conditions, and date any time-limited offer so partners know when to remove it.

E-commerce and SaaS

Prices, discounts and coupon codes go stale quickly. Name banners with the offer and expiry (for example brand_blackfriday_300x250_exp2026-12-01.png) and archive them the day the offer ends, or affiliates will keep sending traffic to a dead promotion.

Back all of this with your affiliate agreement: require partners to use only approved creatives, unaltered, and to remove expired ones within a set number of days after notice.

  1. Produce the core sizes (300x250, 728x90, 320x50, 300x600, 160x600) for each live offer.
  2. Export static images at 2x and keep each within the IAB initial-load limit for its size.
  3. Build HTML5 versions only where motion adds something, and include a static fallback.
  4. Use a naming scheme with brand, offer, size, variant and expiry date.
  5. Write alt text that states the offer, not "banner".
  6. Bake required disclaimers (18+, risk warnings, key terms) into the artwork.
  7. Test each embed code on a blank page and confirm the click reaches your site with the affiliate's tracking intact.
  8. Review the library monthly: archive expired offers and add sizes partners request.

A good creative library is also part of onboarding. Our guide to starting an affiliate program covers what else belongs in a welcome kit.

Manage banners and embed codes in one place

MassPartner's banner library holds static and HTML5 banners per campaign and gives each approved affiliate embed codes with their tracking link and sub IDs built in. Compare plans on the pricing page and try it with the 7-day free trial.

FAQ

What are the most common affiliate banner sizes?

300x250, 728x90, 320x50, 160x600 and 300x600 cover most placements. The first four are IAB standard units, and 300x600 is one of the sizes Google AdSense lists among its top performers.

Are HTML5 banners better than static banners for affiliates?

Not automatically. HTML5 suits animated or interactive messages, but it needs iframe or script support and more QA. Static images work almost everywhere, so supply both and let partners choose.

What file size should an affiliate banner be?

Use the IAB initial-load limit for the size: 150 kB for 300x250, 728x90 and 160x600, and 50 kB for 320x50 mobile banners. Go lower for audiences on slow mobile connections.

What banner size works best on mobile?

The 320x50 smartphone banner and the 300x250 medium rectangle fit most mobile layouts, and 320x100 is a common larger alternative. Export them at 2x so text stays sharp.

Do gambling banners need an 18+ message?

Treat it as required. UK licensees must follow the CAP Code, which bars gambling ads with strong appeal to under-18s, so put 18+ and the responsible-gambling messaging your license requires on every affiliate creative.

Glossary terms in this article

About the author

Daniel Reyes

Tracking & Ad-Tech Editor

Daniel covers affiliate tracking and ad-tech for the MassPartner editorial team: postbacks, click IDs, conversion imports, attribution and fraud signals. His guides are checked against official platform documentation and MassPartner's own product docs.

More articles by Daniel →