Skip to content

Blog

QR Code on a WordPress Page: Pick a Size That Scans

How To Guides

Donatas Simkus Published

laptop on a bakery office desk showing a WordPress page with a QR code beside the text, a phone lying next to it
On this page

If you want a QR code on a WordPress page, the core Image block is all it takes. Download the code as a PNG, add an Image block, upload the file and choose Medium or Large under Resolution. Skip SVG, which WordPress refuses by default, and skip Thumbnail: in our test it was the 1 size that failed our simulated phone camera on a standard monitor.

WordPressFor WordPress: the Image block, the copies it makes and when a plugin helps

WordPress turns 1 upload into as many as 8 files and lets the browser choose among them. So we uploaded a QRplify code to a real WordPress site, kept every copy it made, and decoded each one, then each size as the page showed it on a monitor, a laptop and a phone.

The test: a QR code uploaded to WordPress 7.1

We ran WordPress 7.1.4 on a Mac in WordPress Playground, with its default theme and PHP’s GD library doing the resizing. In QRplify’s free URL generator, with the page’s default style, we made a code for a 43 character page link and downloaded it as PNG, JPG and SVG, the PNG and the JPG each 4096 px wide. We uploaded all 3 to the Media Library through WordPress’s REST API. Then we placed each copy on a page with core Image blocks and decoded it with Apple’s Vision barcode reader.

What WordPress did with the upload:

  • It refused the SVG. The upload stopped with “Sorry, you are not allowed to upload this file type.” The PNG and the JPG went in.
  • It scaled the 4096 px file down to 2560 px. That is the default limit in WordPress’s big image threshold, and the scaled copy, saved with -scaled at the end of its name, became Full Size. The 4096 px original stayed on the server.
  • It made 6 more copies: 150 px for Thumbnail, cropped square, 300 px for Medium, 768 px, 1024 px for Large, 1536 px and 2048 px. The theme handbook lists the first 4 as defaults, and the developer reference adds the last 2.
  • It saved the JPG copies at quality 82, the default in WordPress’s image editor class. Our download was at 95.
  • A new Image block starts at Large. That is the editor’s default Resolution.

Every copy, decoded at full size

PNGJPGReads
Thumbnail, 150 px10 KB12 KBBoth
Medium, 300 px14 KB32 KBBoth
768 px23 KB80 KBBoth
Large, 1024 px20 KB103 KBBoth
1536 px42 KB168 KBBoth
2048 px39 KB219 KBBoth
Full Size, 2560 px77 KB315 KBBoth
Original, 4096 px365 KB384 KBBoth

All 16 files read. Every JPG copy came out heavier than the PNG copy of the same size, about 5 times at Large, so the PNG upload took 590 KB of storage in all and the JPG 1.31 MB.

What a camera sees on the page

A page shows 1 copy at the width its block allows, and WordPress lists the other copies so a browser on a sharp screen can fetch a bigger one. We took a screenshot of each block as a standard monitor, a sharp laptop screen and a phone show it. We decoded each screenshot as shown, then again at half size with a 1 pixel blur, a rough simulation of a phone camera held up to the screen.

Width on the pageStandard monitorSharp laptop screen and phone
Thumbnail150 pxRead as shown, failed the simulated cameraRead both ways
Medium300 pxRead both waysRead both ways
Large645 px on a computer, 330 px on the phoneRead both waysRead both ways
Full SizeThe same as LargeRead both waysRead both ways

The PNG and the JPG gave the same results. The Thumbnail failed the simulated camera on the monitor because the browser drew the 150 px file itself, under 4 screen pixels for each square of the code. On the phone, the browser fetched the 768 px copy for the same 150 px spot.

What that means for your upload:

  • Upload the PNG as it downloads. WordPress makes every smaller copy from it, and all of them read, so you can skip shrinking it first.
  • Pick Medium or Large under Resolution. Medium shows the code 300 px wide. Large filled the text column in our theme.
  • Keep Thumbnail off codes people scan from a screen. It also crops to a square: on a framed code with a label under it, the crop cut off the bottom of the label. The code inside still read.
  • Choose PNG over JPG. Both read at every size, and the PNG copies were lighter.

Which file to download for WordPress

PNG suits a WordPress page best. JPG works too, at a cost in file size, as the table shows.

SVG is the file for print, and WordPress does not accept it as it comes. The developer reference for wp_get_mime_types() lists the image types WordPress takes: JPEG, GIF, PNG, BMP, TIFF, WebP, AVIF, ICO, HEIC and HEIF. SVG is not among them. The list passes through a filter, upload_mimes, as get_allowed_mime_types() shows, so a site’s own code can add types. A code on a web page loses nothing without it: the PNG read at every size.

Keep the SVG for flyers and posters, where it stays sharp at any print size.

How to add a QR code to a WordPress page

  1. Make the code. Paste your link into the free URL QR code generator. It needs no account and makes a static code: the link sits inside the pattern.
  2. Download the PNG. On a computer it comes out 4096 px wide, and WordPress makes its smaller copies on its own.
  3. Add an Image block. In the editor, add an Image block from the block inserter, or type /image and press Enter, as WordPress’s Image block guide shows. Choose Upload and pick the PNG, or Media Library if it is there already.
  4. Pick the size. In the block settings, set Resolution to Medium or Large.
  5. Add alt text. Under Alternative text, say where the code leads, such as “QR code to our spring menu”.
  6. Link it. In the block toolbar, click Link and paste the same URL. A visitor reading on a phone cannot scan their own screen, so give them a link to tap.
  7. Test it. Preview the page and scan the code on your monitor with a phone. Or save the image and open it in the free QR code decoder to see the link inside.

There is a shorter route. Where your browser allows it, click Copy in the generator and paste into the editor. WordPress’s guide says a pasted image may upload to your Media Library on its own. Select it, and if the toolbar still shows Upload to Media Library, click that so the image cannot break later.

The tap link matters in email too, which is why QR codes in an email signature pairs the code with a plain link.

WordPress QR code plugins, and when one is worth it

WordPress has no QR code block of its own: none of the 115 blocks in our fresh install is one. Its plugin directory lists QR plugins from other makers. Kaya QR Code Generator draws a code with a shortcode, a block or a widget, and can use the current page’s address. QR Code Composer makes codes for pages, posts and WooCommerce products by itself, and says they update when a URL changes.

Image blockA QR plugin
Where the code is madeIn a QR code generator, then uploadedInside WordPress, by the plugin
A code on every post1 upload for each codeMade for you, in plugins such as QR Code Composer
Something to installNothing: the Image block is part of WordPressA plugin, kept up to date

Pick by the job:

  • 1 code, or a few, on pages you choose: upload an image. There is nothing to install and nothing to keep updated.
  • A code on every post or product, made for you with no upload each time: a plugin is worth it.

QRplify has no WordPress plugin, and a code on a page does not need one. To make 1 code per post without a plugin, list the links in a CSV file and import them into QRplify, up to 1,000 per import on the free plan. QR codes in Google Sheets shows how to build that file. To let visitors make codes on your site, add QRplify’s free generator to a Custom HTML block, again with no plugin.

Keep the code working after the page moves

A static code holds the page’s link. Move the page or the whole site, and every printed copy of the code still opens the old address.

A dynamic QR code holds a short redirect link instead, so you can change where it points after printing. It counts its scans with city, device and time, as QR code tracking shows. A free QRplify account includes unlimited dynamic codes, and a dynamic code’s PNG goes into WordPress the same way.

The limit, stated before you plan around it: on a free account, once your codes pass 100 scans in a month, scans show a QRplify screen for 3 seconds before the page opens. Premium skips that screen on 5 codes, and the Unlimited and Lifetime plans never show it. Pricing lists what each plan adds.

Size it so it scans

On a screen, give the code at least 300 px of width: the 150 px Thumbnail was the only size our simulated camera could not read on a standard monitor. With the page defaults, the PNG has a solid white background, so a dark theme cannot eat into the quiet zone, the empty margin around the code. For print, how small can QR codes be has the measured minimums, and QR code best practices covers color, contrast and logos.

FAQ: QR codes on WordPress pages

Can you add a QR code to WordPress without a plugin?

Yes. A QR code is an image, so the core Image block shows it. Save the PNG from a QR code generator, upload it in an Image block and set Resolution to Medium or Large. A plugin earns its place when every post needs its own code.

Why won’t WordPress upload my SVG QR code?

SVG is not on WordPress’s list of allowed file types, so the upload stops with “Sorry, you are not allowed to upload this file type.” Download the PNG instead. Every copy WordPress made from our PNG read.

Is there a QRplify WordPress plugin?

No, and you do not need one. Upload the code as an image. To put QRplify’s free generator on your own site, paste its snippet into a Custom HTML block, as the steps for WordPress on the embed page show.

What size should a QR code be on a WordPress page?

Medium, which shows it 300 px wide, or Large. In our test the 150 px Thumbnail read in a screenshot of the page, but on a standard monitor it failed our simulated camera, the same screenshot at half size and blurred.

Get started

Unlimited static codes, free. And unlimited dynamic codes on a free account

No credit card. Free static codes never expire.