*** Find AUTOMATOR in your Applications folder ***
This is one Application that comes with your Apple Computer that I really enjoy using. It's the satisfaction of doing laborious tasks in an instant. Very Satisfying. Herewith some of the scripts that I've used to Automate different tasks.
The above Automator logo is actually code! It is not a referenced image file. It's Base64!
Your image is in the code of your html or PHP document as code. Why do this? Well it reduces http requests to the server for the image or images thus reducing load time. However weigh this up against an approximate 30% increase in relative file size. But, my usage is for HTML e-mail signatures. If you use code rather than images you can have the images load on the signature without the user having to select "view images" to see them. It has the added benefit of not showing up as an attachment (something I find very annoying). Have you ever looked for an attachment that isn't there?
export PATH=/usr/local/bin:$PATH
for f in "$@"
do
echo "$f"
openssl base64 -in "$f" -out "$f.b64"
done
Drag a .jpg, .png, or .gif onto your newly created Automator Application. It will create the code in the same directory you dragged your image from. It will appear as a “.b64” file. Open it up in a text editor to copy and paste the code into your HTML or PHP document.
Remember: Change the image type to correspond with the image you converted png, jpg or gif
<img src="data:image/png;base64,YOUR-BASE64-CODE-IN-HERE
" alt="Image Description" />
Please share if you find the content useful - thank you
FORUM |
|
Have a comment or something to say? |