cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Convert small non-secure (http) graphics and icons in templates to base64.

 

Non-secure images use HTTP instead of HTTPS

There are still some sellers out there who use templates that contain non-secure graphics and images, causing eBay to hide those descriptions one-click away. If those images can't be hosted on a secure (https) server, the seller will need to abandon the images and probably rework or abandon the template design.

 

Encode Images and bypass security

However, if the images are small and lightweight (like under 50K bytes) another option is to convert them to base64 encoding and embed the data directly in the template.  That has been my method going forward for some of the very tiny graphics I've used within descriptions for template designs. 

 

But translating images to base64 has been tedious, so I've posted this converter tool that accepts URLs, desktop files, or drag/drop of either from desktop or webpage. 

 

http://isdntek.com/imagetools/Base64ImageEncoder.htm

 

The conversion is handled within the browser, not on the server, so don't get tricky and try to encode the entire web, or gargantuan photos, or your browser will hang up.

 

A base64 image is just plain text, thus it can be saved as text for swapping out later.

 

Replacing images with base64 data

Base64 data works the same way as an image URL. So if your image is

<img src="http://www.example.com/graphic.gif">

Your (much longer) base64 image data would replace the URL

<img src="data:image/gif;base64,R0lGODlhlg...DwgAOw==">

 

The same goes for stylesheets, where

background-image:url(http://www.example.com/graphic.gif)

would be replace with

background-image:url(data:image/gif;base64,R0lGODlhlg...DwgAOw==)

 

Bulk Replacement

This direct replacement means sellers with graphics common to many listings could potentially bulk replace hosted graphics with the base64 data.  However, the base64 data is likely to be too large for the 1000 character limit on eBay's Find/Replace tool, so the Bulk Active Content Editor might be the way to make bulk replacements.

 

Considerations

Another serious issue to keep in mind is that eBay descriptions can be no larger than 500,000 characters. That means a seller can not convert a 500K image and include it directly in the description. In fact, images totaling over 200K could be pushing the envelope, depending on other resources within the description.

 

Base64 encoding is not suitable for uploading product photos to eBay hosting. If using a bulk listing method like File Exchange, this method will not solve your hosting dilemma. 

 

And finally, if a secure server is available, that is by far the cleanest approach, rather than using base64. However, for very tiny icons about one packet in size (around 1500 bytes), it's actually more efficient to use base64 and eliminate that call to the host server.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 1 of 1
latest reply
0 REPLIES 0