Is a published website optimized with regard to common elements?
I have a 300 x 200 JPG image that I use as an element in many places on a web site. (Although it's not a logo, per se, I suppose the same considerations apply.)
When I publish the site, is a single copy of the image included in the html? ... or is there a separate copy included for each occurrence.
The answer will help me decide how elaborate the element should be.
Thanks in advance for any help.
Re: Is a published website optimized with regard to common elements?
You need to name the image before copying it then it should only produce 1 copy if its copied exactly the same as the original. If its resized, rotated etc. it will product another version of the image. It will also produce hi-res (retina) versions of all images for mobile websites if that option is selected so there may still be more images produced than you expected!
Re: Is a published website optimized with regard to common elements?
Contours, select the initial copy of the image and give it a Name of filename=imagexxx, the last part can be what you like.
Thereafter, copy and paste this as often as you like.
On publish, you will only have a single file, called imagexxx.jpg or imagexxx.png and a retina version.
This won't work on NavBars.
Acorn
Re: Is a published website optimized with regard to common elements?
Thanks to you both!
Although I've never looked at them in detail, I can guess that this is also how tiled backgrounds work ... one image, many occurrences.
Re: Is a published website optimized with regard to common elements?
Quote:
Originally Posted by
Contours
Thanks to you both!
Although I've never looked at them in detail, I can guess that this is also how tiled backgrounds work ... one image, many occurrences.
That is something built into documents rendering in a browser. An object's background style can be an image that is repeated X-, Y- or XY-wise. It becomes especially fun to using CSS3 as there are so many ways to achieving powerful effects quite simply: https://www.w3schools.com/css/css3_backgrounds.asp.
Acorn
Re: Is a published website optimized with regard to common elements?
One of the problems with naming bitmaps is if you're using variants it can really mess them up. However, I don't believe it's even necessary, as Xara uses the same image (e.g. 4.png) on all pages and it's only created once in the index_htm_file folder.
Re: Is a published website optimized with regard to common elements?
Quote:
Originally Posted by
Egg Bramhill
One of the problems with naming bitmaps is if you're using variants it can really mess them up. However, I don't believe it's even necessary, as Xara uses the same image (e.g. 4.png) on all pages and it's only created once in the index_htm_file folder.
If using a conventional website and the image is across a variety of pages or cloned on a page, you get different images saved despite them all being identical.
Acorn
Re: Is a published website optimized with regard to common elements?
So say I have a site with three variants and an image that I want to be named, and to scale proportionately on all three variants.... and to be repeated in several locations on the site. What's the most efficient way to do this?
2 Attachment(s)
Re: Is a published website optimized with regard to common elements?
That's not correct Acorn. If you copy or clone an unnamed image on a page or over several pages it will retain that name across all pages unless it's resized / rotated etc and will only have a single image within the index_htm_files.
Named images on the other hand are worse than I thought. It's not just across variants that they mess up the bitmaps, it's within a single, non variant site.
Unlike unnamed images, named images retain their filename when their size is altered. Unfortunately on each subsequent publish, Xara either exports the original image and reduces the smaller to size in the browser OR exports the smaller image and enlarges this smaller image within the browser.
See the attached. Try subsequent Publishs and notice in particular the changing image quality of the crocus.jpg on page 1
Also try duplicating page 3 and rotate crocus.jpg. It's a dogs dinner!
Re: Is a published website optimized with regard to common elements?
Yes, forcing image filenames is overriding all the clever systems xara have put in place to always render an image at its best, but the naming of an object does at least avoid unnecessary duplication of identical image files.
If someone wants to have named images that could be referred to for download for example, they could still do this in xara, just stick it on a separate (hidden) page not in the menu and use the filename technique described above.