mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS: fixed links in Images doc (#7952)
* DOCS: fixed links in Images doc * DOCS: format API link labels with code backticks
This commit is contained in:
parent
983a724ea5
commit
da18412df4
@ -2,22 +2,22 @@ summary: Learn how to crop and resize images in templates and PHP code
|
|||||||
|
|
||||||
# Image
|
# Image
|
||||||
|
|
||||||
Image files can be stored either through the `[Image](api:SilverStripe\Assets\Image)` dataobject, or though [DBFile](api:SilverStripe\Assets\Storage\DBFile) fields.
|
Image files can be stored either through the [`Image`](api:SilverStripe\Assets\Image) dataobject, or though [`DBFile`](api:SilverStripe\Assets\Storage\DBFile) fields.
|
||||||
In either case, the same image resizing and manipulation functionality is available though the common
|
In either case, the same image resizing and manipulation functionality is available though the common
|
||||||
[ImageManipulation](api:SilverStripe\Assets\ImageManipulation) trait.
|
[`ImageManipulation`](api:SilverStripe\Assets\ImageManipulation) trait.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Managing images through form fields
|
### Managing images through form fields
|
||||||
|
|
||||||
Images can be uploaded like any other file, through [FileField](api:SilverStripe\Forms\FileField).
|
Images can be uploaded like any other file, through [`FileField`](api:SilverStripe\Forms\FileField).
|
||||||
Allows upload of images through limiting file extensions with `setAllowedExtensions()`.
|
Allows upload of images through limiting file extensions with `setAllowedExtensions()`.
|
||||||
|
|
||||||
### Inserting images into the WYSIWYG editor
|
### Inserting images into the WYSIWYG editor
|
||||||
|
|
||||||
Images can be inserted into `[HTMLValue](api:SilverStripe\View\Parsers\HTMLValue)` database fields
|
Images can be inserted into [`HTMLValue`](api:SilverStripe\View\Parsers\HTMLValue) database fields
|
||||||
through the built-in WYSIWYG editor. In order to retain a relationship
|
through the built-in WYSIWYG editor. In order to retain a relationship
|
||||||
to the underlying `[Image](api:SilverStripe\Assets\Image)` records, images are saved as [shortcodes](/developer-guides/extending/shortcodes).
|
to the underlying [`Image`](api:SilverStripe\Assets\Image) records, images are saved as [shortcodes](/developer-guides/extending/shortcodes).
|
||||||
The shortcode (`[image id="<id>" alt="My text" ...]`) will be converted
|
The shortcode (`[image id="<id>" alt="My text" ...]`) will be converted
|
||||||
into an `<img>` tag on your website automatically.
|
into an `<img>` tag on your website automatically.
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ The image manipulation functions can be used in your code with the same names, e
|
|||||||
|
|
||||||
Some of the MetaData functions need to be prefixed with 'get', example `getHeight()`, `getOrientation()` etc.
|
Some of the MetaData functions need to be prefixed with 'get', example `getHeight()`, `getOrientation()` etc.
|
||||||
|
|
||||||
Please refer to the [ImageManipulation](api:SilverStripe\Assets\ImageManipulation) API documentation for specific functions.
|
Please refer to the [`ImageManipulation`](api:SilverStripe\Assets\ImageManipulation) API documentation for specific functions.
|
||||||
|
|
||||||
### Creating custom image functions
|
### Creating custom image functions
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ SilverStripe\Filesystem\Storage\DBFile:
|
|||||||
|
|
||||||
### Form Upload
|
### Form Upload
|
||||||
|
|
||||||
For usage on a website form, see [FileField](api:SilverStripe\Assets\FileField).
|
For usage on a website form, see [`FileField`](api:SilverStripe\Assets\FileField).
|
||||||
|
|
||||||
### Image Quality
|
### Image Quality
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ SilverStripe\Assets\Storage\DBFile:
|
|||||||
#### Resampled image quality
|
#### Resampled image quality
|
||||||
|
|
||||||
To adjust the quality of the generated images when they are resampled, add the
|
To adjust the quality of the generated images when they are resampled, add the
|
||||||
following to your mysite/config/config.yml file:
|
following to your `mysite/config/config.yml` file:
|
||||||
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
|
Loading…
Reference in New Issue
Block a user