Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8686639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:54:18+00:00 2026-06-12T22:54:18+00:00

I creating a WordPress theme, and I have implement a function that allowing the

  • 0

I creating a WordPress theme, and I have implement a function that allowing the images to be served embeded into the HTML document and the CSS files.

What I mean is that instead of adding images in my web site as:

<!-- In HMTL -->
<img src="http://www.some-url.ext/img/my_image.jpg" />

/* In CSS */
selector
{
    background-image: url(http://www.some-url.ext/img/my_image.jpg);
}

to add the image in my site in the following form:

<!-- In HMTL -->
<img src="data:image/gif;base64,R0lG...." />

/* In CSS */
selector
{
    background-image: url(data:image/gif;base64,R0lG....);
}

The processed images are stored in cache files for better performance.

My current theme also has a full width slider, that contains images that are large.

The issue is that the processed document has the size of 1.83MB because of the embeded images.

Also the document while is loading very fast, anything bellow the slideshow is getting slower to be displayed 🙁

So, is it better to embed the images into the document or is it better to use the normal way with URLs ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:54:19+00:00Added an answer on June 12, 2026 at 10:54 pm

    The answer, as usual, is “it depends”. Here are some points of interest:

    • Embedding images can speed up pages by reducing the number of HTTP requests, so for lots of little files, it can help.
    • Encoding in base 64 will increase the size of the images by about 1/3.
    • Because the browser has to decode the image, it can slow down rendering.

    See http://en.wikipedia.org/wiki/Data_URI_scheme for a more exhaustive list of pros and cons.

    For large images, I would say you’re better off taking the HTTP request hit. You can use various preloading schemes to make the HTTP hits less visible to the user.

    PageSpeed, YSlow, etc., are guidelines, not gospel. As you are finding, you should always test the changes and find out what makes sense for your site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wordpress theme that has a build in shortcode for creating an
I am creating a slideshow shortcode for my Wordpress theme, but have run into
Hi I am creating a wordpress custom page theme, I have included the code.
I'm currently creating a Wordpress theme and I have an area which displays the
I am creating a WP-theme, and run into a problem. I want to have
I have been creating a WordPress theme and have got a bit stuck with
I am relatively new to wordpress, I am creating a custom theme, and so
I am creating my first wordpress plugin. one of the questions i have is
I have 2 custom fields in my WordPress system when creating new posts. One
I am trying to implement WordPress into quite a large site with a complex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.