---
title: "URL conversion example"
description: "This example shows you how to setup TinyMCE to produce different results for URLs in images and links. You can read more about these config options in the FAQ."
canonical_url: "https://www.tiny.cloud/docs/tinymce/5/url-conversion/"
md_url: "https://www.tiny.cloud/docs/tinymce/5/url-conversion/index.md"
version: "5"
last_updated: "2024-03-26T08:09:19Z"
tokens: 490
---
Important This page documents TinyMCE 5. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/).
# URL conversion example

This example shows you how to setup TinyMCE to produce different results for its URLs in images and links. You can read more about these config options in the [TinyMCE FAQ](../get-support/).

## Absolute URLs on links and images

**Example**

```js
tinymce.init({
  selector: '#url-conversion-absolute-1',
  height: 300,
  plugins: 'link image code',
  relative_urls: false,
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
```

## Absolute URLs and including domain on links and images

**Example**

```js
tinymce.init({
  selector: '#url-conversion-absolute-2',
  height: 300,
  plugins: 'link image code',
  relative_urls: false,
  remove_script_host: false,
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
```

## Relative URLs on links and images

**Example**

```js
tinymce.init({
  selector: '#url-conversion-relative-1',
  height: 300,
  plugins: 'link image code',
  relative_urls: true,
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
```

## Relative URLs on links and images to a specific page

**Example**

```js
tinymce.init({
  selector: '#url-conversion-relative-2',
  height: 300,
  plugins: 'link image code',
  relative_urls: true,
  document_base_url: '//www.tiny.cloud/docs/demo',
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
```

## No URL conversion

**Example**

```js
tinymce.init({
  selector: '#url-conversion-none',
  height: 300,
  plugins: 'link image code',
  convert_urls: false,
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});
```
