8.1 Why won't my WBMP images appear?

Images are placed in the text flow by using the <img> WML tag. Most commonly the problem with broken images is caused by the wrong syntax of the <img> tag. The absolute minimum number of parameters for this tag is "src" and "alt". Other parameters are optional. The "src" parameter specifies the path to the image file, and the "alt" parameter specifies an alternative text string which will be displayed if the micro browser cannot display the image. Also remember that parameter values must be enclosed in double quotes.

  <img src="path/filename.wbmp" alt="Alternative Text"/>

If the decks are served by an HTTP server, the server must also be set up to handle the correct MIME type of WBMP images. The correct MIME type for WBMP's is "image/vnd.wap.wbmp".

The problem could also be caused by the image itself. The WBMP format is very limited. The maximum number of colors is 2, and the size is limited to the display of the WAP device. Some WAP Development Kits lets you use GIF images, but WAP devices supports only WBMP images.

[ Main ]   [ 08 - Troubleshooting ]