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

  • SEARCH
  • Home
  • 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 8013321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:36:19+00:00 2026-06-04T19:36:19+00:00

How to get all images from a specific website and replace them with base64

  • 0

How to get all images from a specific website and replace them with base64 encodings?
Server-side solutions would work.
like:

var img = document.querySelectorAll("img");
for (var i = 0; i < img.length; i++) {
    //replace with base64 encoding
}

Why: I wanted to create an e-book (mobi) based on a RSS feed. I already converted the content to HTML but the images need to be local for display. Replacing the images base64 looked like the best solution.

  • 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-04T19:36:20+00:00Added an answer on June 4, 2026 at 7:36 pm

    Something like this:

    jQuery + canvas:

    $("img").load(function(i) {
        var $this = $(this),
            jCanvas = $("<canvas width='" + $this.width() + "' height='" + $this.height() + "'/>"),
            oCanvas = jCanvas[0];
    
        oCanvas.getContext("2d").drawImage(this, 0, 0);
    
        this.src = oCanvas.toDataURL();
    });
    

    But this will only work if the image is on the same domain as the script.

    Demo: http://jsfiddle.net/K5RY3/3/

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

Sidebar

Related Questions

I would like to decompile a .swf file and get all the images from
I am able to get all images from sdcard,but I want to show file
I'm trying to get the source attribute of all images withing a specific div
From any specific Post, I am trying to display all images, with their corresponding
How to get all the images, after decoding if possible, on a webpage through
I am trying to get all the images with class front and display their
I'm trying to get the number of all images stored in the SD, but
I figured out how to get all the user's images in the camera roll
I am fetching url like facebook. For all images in that page I get
I noticed that almost all email messages I get do not embed images, but

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.