How to Convert a JPEG Design Into a WordPress Theme

Khadijah Maulion Masorong·September 26, 2026
Convert a JPEG Design Into a WordPress Theme — json to wordpress
Udemy US - CPS

Converting a flat JPEG design into a working WordPress theme feels like magic until you actually do it. Then you see it’s a logical sequence: audit the design, slice the assets, build the markup, structure the theme files, wire up dynamic features, test everything, then launch. Follow that sequence and any static mockup becomes an editable, dynamic website. This guide walks through every stage of that process the way it actually works on real projects.

Capcut

Before you start, consider whether a custom theme is the right move at all. If you’re still weighing custom builds versus pre-built templates, Custom WordPress Themes vs Templates: SMB Guide 2026 covers that decision first. Once you’ve committed to a custom build, the steps below work whether your source is a JPEG, PNG export, or flattened PSD.

Audit the JPEG Design for Structure and Assets

Never open a code editor first. Open the image and read it like a blueprint, not a picture. A JPEG mockup is a flattened snapshot of a website’s future layout, and your job is to reverse-engineer the structure hiding inside it.

Start by identifying the reusable sections that will become separate WordPress template parts:

  • Header – logo placement, navigation menu, top bar or search icon
  • Hero or banner area – headline, subhead, call-to-action button
  • Content blocks – services, testimonials, feature grids, blog previews
  • Sidebar (if present) – widgets, related links, ads
  • Footer – links, copyright, social icons, secondary navigation

Next, catalog everything that needs to be recreated in code rather than copied as a picture: fonts (identify the family and weights), the color palette (pull exact hex values with an eyedropper tool), spacing patterns (margins, padding, grid gaps), and every distinct image asset that needs extraction.

Design Audit Checklist

  • Every repeating section is labeled (header, footer, nav, content blocks)
  • Font families and weights identified
  • Full color palette extracted with hex codes
  • Spacing and grid rhythm measured (in px or rem)
  • All images, icons, and logos cataloged with file names
  • Any interactive elements noted (dropdowns, sliders, forms)

This step takes longer than most people expect, and skipping it is the single biggest reason JPEG-to-WordPress conversions fail later. A rushed audit means you’ll be re-measuring spacing and guessing at colors halfway through building templates, which costs far more time than doing it correctly up front.

Slice and Prepare Image Assets

Image slicing means cutting a single flat design file into the individual graphic pieces a browser needs: a logo, icon set, background texture, or hero photo, each saved as its own optimized file. You can’t upload a whole JPEG mockup to a website and expect it to function like a real page. Everything that isn’t built with HTML and CSS needs extraction as a standalone image.

Common slicing methods:

  1. Use the layer or selection tools in a raster editor like Adobe Photoshop or GIMP to export individual regions
  2. Use an online slicing tool for quick batch exports when the design has simple, clearly bounded sections
  3. Manually crop in any image editor when only a handful of assets need extraction

Once assets are sliced, format choice affects performance:

Format Best Use Case Notes
JPEG Photographs, complex gradients Smaller files, some quality loss
PNG Logos, icons, transparent backgrounds Larger files, lossless
WebP Most modern use cases Smaller than JPEG/PNG at similar quality, wide browser support
SVG Icons, simple vector logos Infinitely scalable, tiny file size

Name every file with a clear, consistent convention from the start (header-logo.png, icon-phone.svg, hero-bg.webp) rather than the generic image1.jpg your design tool exports by default. Future you, or whoever maintains this theme after launch, will be grateful. This naming discipline also feeds directly into WordPress theme file structure conventions later, where assets live in a dedicated /images or /assets subfolder inside the theme directory.

Build the HTML/CSS Markup Foundation

With assets sliced, translate the design into semantic HTML5 before it touches WordPress. This means real <header>, <nav>, <main>, <article>, and <footer> tags rather than a pile of generic <div> elements. Semantic markup is easier to maintain and helps search engines and screen readers understand the page.

Build the CSS next: set up the grid or flexbox layout that matches the mockup’s spacing and alignment, define color variables, and create typography rules that match the fonts identified in the audit. Plan responsive breakpoints now, not later, so layout logic is built in from the start rather than bolted on.

Two approaches to consider:

Approach Pros Cons
Static HTML/CSS first, then convert Easier to debug layout in isolation; browser preview without a server; clean separation of design and WordPress logic Adds an extra conversion pass later
Build directly inside WordPress templates Fewer total steps; see dynamic content immediately Debugging layout and PHP errors simultaneously is harder for beginners

For most freelancers and small teams, building static HTML/CSS first is the more reliable path, especially on a first conversion. It isolates layout problems from WordPress problems, so when something breaks, you know exactly which half of the process caused it.

Set Up the WordPress Theme File Structure

This is where the project becomes an actual WordPress theme rather than a folder of HTML files. A minimum viable custom theme lives inside /wp-content/themes/your-theme-name/ and needs a handful of core files working together.

Core WordPress Theme Files and Their Purpose

File Purpose
style.css Contains the required theme header comment (name, author, version) that WordPress reads to register the theme; also holds primary styling
functions.php The theme’s "engine room": registers menus, widget areas, custom post types, and enqueues scripts and styles
header.php Controls everything from the opening <html> tag through the site’s navigation, typically shared across every page
footer.php Controls the closing markup, footer widgets, copyright line, and closing script tags
index.php The fallback template WordPress uses when no more specific template matches
Page templates (page-*.php, single.php, etc.) Control the layout for specific page types or individual posts

According to the WordPress Theme Handbook published by the WordPress core development team, style.css and index.php are technically the only two files required for WordPress to recognize a directory as a valid theme. A functioning real-world theme needs considerably more than that bare minimum to be usable.

In practice, copy the finished static HTML into these files piece by piece: the top portion (doctype, head, opening body, navigation) goes into header.php, the bottom portion (footer content, closing tags) goes into footer.php, and everything in between becomes the body of whichever template file controls that page type.

Convert Markup Into WordPress Template Files

Once the header, footer, and core styles exist as separate files, break the rest of the static HTML into WordPress template parts and reassemble using PHP’s get_header(), get_footer(), and get_template_part() functions. This is also where the WordPress template hierarchy begins to matter.

The template hierarchy is the rule system WordPress uses to decide which PHP file renders any given page. Request a single blog post and WordPress looks for single.php; request a specific page and it checks for a page-specific template before falling back to page.php, then index.php if nothing more specific exists. Understanding this hierarchy is what separates a theme that behaves predictably from one that breaks the moment someone adds a new page or post type.

If the original JPEG design included a distinct layout for something like a portfolio, a product catalog, or a team directory, introduce a custom post type rather than forcing that content into regular blog posts or pages. A custom post type gives that content its own admin section, its own template file, and its own structured data, keeping the site organized as it grows. For clarity on what separates a true custom theme from a customized off-the-shelf template at this stage, What Is a Custom WordPress Theme? Full Explanation explains that distinction.

Wire Up Dynamic WordPress Functionality

A theme isn’t finished once the visuals match the JPEG. It needs to actually behave like a WordPress site: editable menus, functioning widget areas, and content a client can update without touching code.

Wire up these key features in functions.php and related template files:

  • Menus – register navigation menu locations so the client can build and reorder links from the WordPress admin instead of hardcoded HTML links
  • Widgets – register sidebar or footer widget areas if the design calls for them
  • The WordPress Customizer – expose theme options (logo upload, color accents, social links) so non-technical users can adjust the site’s appearance without editing PHP
  • Enqueuing scripts and styles – always load CSS and JavaScript using wp_enqueue_style() and wp_enqueue_script() rather than hardcoding <link> and <script> tags directly into header.php, which avoids conflicts with plugins and other scripts

This is the right moment to think about long-term maintenance. If this design will evolve, or if it’s built on top of an existing theme’s structure, consider whether a child theme makes more sense than modifying a parent theme directly. A child theme inherits all the functionality of its parent while isolating your customizations in a separate folder, so a parent theme update never wipes out custom work. For a from-scratch JPEG conversion, most practitioners build a standalone custom theme rather than a child theme, but the decision depends on whether you’re starting from zero or adapting something that already exists. For more on what "customizable" really means in this context, see Customizable WordPress Themes: What "Customizable" Really Means.

Confirm the WordPress block editor still behaves properly with the new theme. Custom themes need to declare support for features like wide alignment and editor styles so that content edited in the block editor visually matches what visitors see on the live site.

Test Responsiveness and Cross-Browser Behavior

A JPEG mockup usually shows one fixed size, often a desktop view. Translating that into a real website means deciding how every section behaves at every screen width, not just the one the designer happened to draw.

Test at minimum these standard breakpoints:

  1. Desktop (1200px and above)
  2. Tablet (768px to 1199px)
  3. Mobile (up to 767px)

Mobile testing carries real weight. According to StatCounter Global Stats, mobile devices account for well over half of global web traffic, so a theme that only looks right on desktop fails the majority of its likely visitors before launch.

Cross-browser testing means checking that the finished theme renders and functions consistently across Chrome, Firefox, Safari, and Edge, since each browser engine interprets CSS and JavaScript slightly differently. Free tools like BrowserStack’s limited trial or simply opening the staging site in each browser installed on your machine both work for smaller projects. Pay particular attention to flexbox and grid behavior, font rendering, and any custom form styling, since these areas are most likely to look slightly different browser to browser.

All testing should happen on a staging environment, a private copy of the site not visible to the public, rather than directly on the live domain. A staging environment lets you catch layout bugs, broken links, and PHP errors before a single real visitor sees them. Most managed WordPress hosts include a one-click staging feature for exactly this purpose.

Here’s a video that walks through converting a finished front-end build into a working WordPress theme end to end, useful as a visual companion to the steps above.

Quality Assurance Before Launch

The last stretch before launch is a full proofing pass, not a quick glance. Treat this like the final inspection before handing over keys to a finished house.

Pre-Launch QA Checklist

  • Every sliced image displays at the correct size with no stretching or pixelation
  • All navigation links go to the correct pages
  • Forms submit successfully and send notifications where expected
  • Fonts and colors match the original JPEG design within reasonable tolerance
  • Site loads correctly on all major breakpoints (desktop, tablet, mobile)
  • Site renders consistently in Chrome, Firefox, Safari, and Edge
  • Page load speed has been checked and obvious bottlenecks addressed
  • Basic accessibility checks completed (alt text on images, readable color contrast, keyboard navigation on menus)
  • WordPress Customizer options work and save correctly
  • All plugins used on the site remain compatible with the new theme
  • A full backup exists before pushing the staging site live

Run through this list on the staging environment first, fix anything that fails, then run it again after the site goes live to confirm nothing changed in the deployment process.

Common Pitfalls When Converting a JPEG to a WordPress Theme

Even an experienced builder can trip on the same handful of mistakes. Watch for these:

  • Skipping the design audit – jumping straight into slicing or coding without first cataloging fonts, colors, and sections causes rework later, once inconsistencies surface halfway through the build.
  • Hardcoding content instead of using dynamic WordPress fields – if text, images, or links are typed directly into template files rather than pulled from WordPress’s post, page, or Customizer data, the client loses the ability to edit their own site, which defeats much of the point of using WordPress.
  • Ignoring responsive breakpoints until the end – treating mobile layout as an afterthought instead of planning it alongside the desktop build creates far more rework than testing responsiveness continuously throughout the build.
  • Not using a child theme or staging environment – editing a live production site directly, or modifying a parent theme’s core files without a child theme safety net, both invite unnecessary risk that a proper workflow avoids entirely.
  • Forgetting to optimize sliced images – uploading full-resolution, uncompressed exports slows the entire site down, undoing much of the performance benefit of building a lean custom theme.

Frequently Asked Questions

Can you really convert a JPEG design directly into a WordPress theme?

Yes. A JPEG is treated as a visual reference rather than something WordPress can import automatically. The image gets rebuilt as semantic HTML and CSS, then restructured into WordPress’s required theme files, so the final result matches the design while behaving as a fully dynamic, editable website.

Do I need to know how to code to convert a JPEG into a WordPress theme?

Some working knowledge of HTML, CSS, and basic PHP is genuinely necessary for a fully custom build, since WordPress theme files are PHP templates. Readers without coding experience typically either learn enough HTML, CSS, and PHP fundamentals to get through the process, or hire someone to handle the technical build once the design and content are ready.

What tools are needed to slice a JPEG design for WordPress?

A raster image editor such as Adobe Photoshop or the free, open-source GIMP handles slicing well. Beyond that, a code editor for writing HTML, CSS, and PHP, plus an FTP client or hosting file manager for uploading theme files, rounds out the essential toolkit.

How long does a JPEG-to-WordPress theme conversion typically take?

Timeframes vary widely depending on the design’s complexity, how many unique page templates it requires, and how much custom functionality (custom post types, complex Customizer options) is involved. A simple single-page design with basic sections takes considerably less time than a multi-template site with catalogs, forms, and custom content types.

Should I build a child theme or a brand-new custom theme?

A brand-new custom theme is the right call when converting a JPEG mockup from scratch, since there’s no existing parent theme to inherit from. A child theme becomes the better option only when you’re customizing an already-installed theme and want to preserve the ability to update that parent theme safely in the future.

What’s the difference between converting a JPEG vs. a Figma file to WordPress?

A JPEG is a flattened, static image with no embedded design data, so every measurement, color, and spacing value must be manually extracted during the audit step. A Figma file retains layers, exact spacing values, and component structure that can speed up parts of the audit and asset-export process. The two source formats change how much manual measuring is required up front, though the WordPress build steps that follow are largely the same. For a dedicated walkthrough of that alternate path, see How to Convert Figma to WordPress: Step-by-Step Guide.

Converting a flat image into a living, dynamic website is genuinely satisfying work once you’ve done it a few times, and it becomes far more repeatable once these eight steps are second nature. If you want to see this exact methodology applied to a real project from start to finish, the JPEG to WordPress theme case study walks through a completed build in detail. And if what you’re really weighing is whether a fully custom build is the right call for your project at all, custom WordPress theme development is the professional service this entire workflow supports.

Sources

Conversation

One thought so far

Good work gets better when people bring thoughtful questions, ideas, and perspective.

Leave a considered reply

Your email stays private. Required fields are marked *.