Images with posts and in settings

xScape allows you to upload images use WordPress Media Manager, use external images or download image from external URL. All images are resized and cached as needed by the framework. This tutorial has more info on what’s the best practice.

Media Button
Media Button

On the image on the right, you can see typical form element for setting images in xScape. You can see path to image (relative to wp-content if the image is local), you see red folder button that opens WP Media Manager, red zoom button to open popup preview, checkbox to delete existing image (if uploading new one) and upload control. On post edit page, zoom button is replaced with thumbnail of existing image.

Setting the image

There are several ways to set an image:

  1. Browse/upload. Simply, use Browse control to select image from your computer to upload it. Upload is done when you click on Save button on xScape panels or by saving the post on the post edit page. Uploaded image needs to obey size rules set on the xScape Global Settings panel (size in KB and dimensions).
  2. WP Media Manager. Click on red folder button will open well known, standard WordPress Media dialog. From here you can select image that is already in the WordPress, or to upload new one into default WordPress uploads folder. Click on Insert Into Post button to add image to the image control.
  3. Direct URL. If you enter full URL to the image into the field, once you save it, xScape will test the URL. If it’s a local URL, it will be cleaned up and displayed relative as all other URL’s. If it’s from another website, it will be downloaded (again, xScape Global Settings panel controls this), or used as remote if the downloading is not enabled.

Checkbox (ON/OFF) Delete currently uploaded image will be used only if there was image previously set and you are replacing it by another, and only if you uploaded image using xScape upload. Be careful with this, because some other post can use same image, and if you delete it, you will cause problems for other posts. Use this option only if you are sure that previous image is used only with one setting or post.

Limitations

Since resizing of images is done using WordPress built in functions, there are some rules to obey. It’s best to use image names that are only lower case. For most images, WP will make resized image name lower case. Don’t use special characters that can make problems with Linux OS. I don’t recommend use of #!$+& characters. They should be legal to use on Linux OS, but they can be a problem for WP resize functions.

Notice: xScape 1.4.8 will automatically clean and rename images upload by xScape to try to avoid such problems. Only some characters will be removed, and name will be always saved as lowercase.

Limitation of size set in xScape Global Settings is important only for images uploaded by xScape or downloaded from external URL.

Best method for setting images?

If you have all images you need uploaded through WordPress Media Manager, I recommend that you use it to set all xScape images as well. In all other cases, it’s up to you to select method.

Comments

Leave a Reply