Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocCollector Update #31

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/v4/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:edit_info: develop/docs/community.md
---

# Community plugins and articles
# Communuty plugins and articles



Expand Down
4 changes: 2 additions & 2 deletions content/docs/v4/install/index.slim
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ h2 Ready to go live?
markdown:
1. Review the [Best Practices Guide](/docs/best-practices) and [our license options](/licenses).

2. Get [an ImageResizer license](/licenses), which includes [disk caching](/plugins/diskcache) and dozens of other valuable plugins.
2. Get the [Performance Edition](/plugins/editions/performance) or [a support contract](/support/contracts), which includes [disk caching](/plugins/diskcache) and dozens of other valuable plugins. Can't afford mistakes? We can review your media architecture and verify scalability as part of any support contract.

3. Take a look at client-side components like [Slimmage.js](https://github.com/imazen/slimmage), which can make responsive images painless. There [are many third-party libraries that can make integration easier](/docs/community).

4. Join the community [on Github](https://github.com/imazen/resizer) or [on UserVoice](http://resizer.uservoice.com/forums/108373-image-resizer)
2 changes: 1 addition & 1 deletion content/docs/v4/install/license_keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ All functionality will continue to work, but newly generated images will have a
<license>
domain.com(R4Performance includes R4Performance):RG9tYWluOiByZXNpemVyLmFwcGhiLmNvbQpPd25lcjogTmF0aGFuYWVsIEpvbmVzCklzc3VlZDogMjAxNS0wNS0wMVQxNTowNzo1NloKRmVhdHVyZXM6IFI0UGVyZm9ybWFuY2U=:oWv2YlAkzTEWcaJ6fPMEsweTNh9Bt5evhjWVNHuXtiRNl22sSS3OB/XE69NsSx8kEs1ExSwzvjwPx95paQyxGsTDigdh/UCkh7TCUyIECX7pI2JtA5f3KkFzfwmISIE8d14Kyf3ijO6s2HI1A1obbH5IucyaDJLQBCSrykxJK6JM4NOM82UbAUfwXRCnjWw2frwtBDp9rezJ46iQ80BXxTJ1LXlSqBry5z7bdSZtcP2k8L+Zp3t+9Blfl2k6z0um06kDa7RkPnmfwKCYTU+HbPQ2qDfGvcNaRC6XEa17ztTn52T6hErS7AJKIZ4OKxvw3olLmmVjEg+LiuKo7NVmmQ==
</license>
</license>
</licenses>
</resizer>

<system.web>
Expand Down
10 changes: 7 additions & 3 deletions content/docs/v4/plugins/advancedfilters.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ h1 AdvancedFilters plugin

.markdown-body
markdown:
Apply advanced effects to your images. Requires Full Trust.
Apply advanced effects to your images. These are implemented in C#. Those which touch each pixel hundreds of times (like sharpen, blur, remove noise, and oilpainting) can perform poorly on large images.

If you just want sharpening, use the Fastscaling plugin and `&f.sharpen` instead. `f.sharpen` adds no performance overhead, and produces better results (it is integrated with the resampling phase). `f.sharpen` is also supported by Imageflow.

**This plugin is not forwards-compatible. Avoid these URL commands for maximum compatibility with Imageflow and future major ImageResizer releases.**


The plugin currently applies effects to the image along with any background color, padding, or drop shadow that may be present. Future versions may simply apply the effect to the image, not the surrounding area. Note: does not affect borders or watermarks.

- image_width = 400
- cache_buster = "000006"
Expand All @@ -43,7 +47,7 @@ h1 AdvancedFilters plugin
- random_image = "%03d" % Random.new.rand(1..30)
- image_options.each do | opt |
li
img src="https://z.zr.io/rw/pluginexamples/example-#{random_image}.jpg?format=png&width=#{image_width}&#{opt}"
img src="http://z.zr.io/rw/pluginexamples/example-#{random_image}.jpg?format=png&width=#{image_width}&#{opt}"
.slide-caption.n.hidden-phone
- if canny_options.include? opt
h3 Canny Edge Detector
Expand Down
8 changes: 4 additions & 4 deletions content/docs/v4/plugins/animatedgifs.slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ h1 AnimatedGifs plugin
.markdown-body
markdown:

Adds support for resizing animated gifs. Once added, animated gifs will be resized while maintaining all animated frames. By default, .NET only saves the first frame of the GIF image.
Adds support for resizing animated GIFs. Once added, animated GIFs will be resized while maintaining all animated frames. By default, .NET only saves the first frame of the GIF image.

Best used with disk caching, as large animations can take a while to process (sometimes even over a second).
Best used with disk caching, as large animations/movies can take a while to process (sometimes several seconds).

- image_width = 300

Expand All @@ -31,8 +31,8 @@ h1 AnimatedGifs plugin
br
p
.twentytwenty-container
img src="https://z.zr.io/rw/pluginexamples/example-animated.gif?format=jpeg&width=#{image_width}" id="plugin-example-before"
img src="https://z.zr.io/rw/pluginexamples/example-animated.gif?width=#{image_width}" id="plugin-example-after"
img src="http://z.zr.io/rw/pluginexamples/example-animated.gif?format=jpeg&width=#{image_width}" id="plugin-example-before"
img src="http://z.zr.io/rw/pluginexamples/example-animated.gif?width=#{image_width}" id="plugin-example-after"

p
| Settings: width = 300
Expand Down
20 changes: 14 additions & 6 deletions content/docs/v4/plugins/autorotate.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,27 @@
:tags: plugin
:bundle: free
:edition: free
:tagline: Use the EXIF rotation data from the camera to auto-rotate your images.
:tagline: Use the Exif rotation data from the camera to auto-rotate your images.
:aliases: "/plugins/autorotate"
:edit_info: develop/core/plugins/basic/autorotate_readme.md
---

# AutoRotate plugin (deprecated, built-in)
# Rotate images by Exif data

Automatically rotates images based on the EXIF Orientation flag embedded by the camera.
Automatically rotate images based on the Exif Orientation flag embedded by the camera.

ImageResizer v4 has subsumed AutoRotate into the core; it does not need to be added. You can enabled autorotation on all processed images via Web.config:
## Enable autorotation for all images by default via Web.config

<pipeline defaultCommands="autorotate.default=true" />

<pipeline defaultCommands="autorotate.default=true" /> ]

The default is "false"

Or, indiviudally using `&autorotate=true`
## Via URL

`&autorotate=false` or `&autorotate=true` will override the default.


### Historical note

ImageResizer v4 has subsumed AutoRotate into the core; it is no longer a plugin.
2 changes: 2 additions & 0 deletions content/docs/v4/plugins/azurereader2.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Ben Foster has [written a great walkthrough](http://benfoster.io/blog/high-perfo
2. Add ImageResizer.Plugins.AzureReader2.dll to the project or /bin. Or, `Install-Package ImageResizer.Plugins.AzureReader2`
3. In the `<plugins />` section, insert one of the following, depending on your scenario.

Prior to V4.1, only appSettings was consulted for locating a connectionString by name - connectionStrings were not checked. For backwards compatibility, a match in appSettings is used before a match in connectionStrings.

```
<add name="AzureReader2" prefix="~/azure" connectionString="NamedConnectionString" />

Expand Down
2 changes: 1 addition & 1 deletion content/docs/v4/plugins/batchzipper.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ Please refer to the excellent XML documentation for further details - it is very
Response.Write("\n" + Math.Round(percentComplete) + "% complete");
//Note, however, on a live server, that opening a file for writing may take much longer than reading, thus
//even 90% of elapsed time could occur before the first item is resized. This is very much an I/O bound process, and
//calculting a percentage complete is nearly worthless on a live server.
//calculating a percentage complete is nearly worthless on a live server.
}
}
15 changes: 8 additions & 7 deletions content/docs/v4/plugins/clientcache.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
:tags: plugin
:edition: free
:bundle: free
:tagline: "(default) - Sets Cache-control, Expires, and Last-modified headers for
optimum performance."
:tagline: "(default) - Sets Cache-control and Expires headers for optimum performance."
:aliases: "/plugins/clientcache"
:edit_info: develop/core/plugins/basic/clientcache_readme.md
---

# ClientCache plugin

If an expiration duration is specified, ClientCache sends "Cache-control" and "Expires" HTTP headers to the client. Installed by default.
This plugin has no effect when using the AsyncInterceptModule.

If an expiration duration is specified, ClientCache sends "Cache-control" and "Expires" HTTP headers to the client. Installed, but not configured, by default.

IIS-level configuration (even in Web.config) can override the values set by ClientCache. Keep this in mind when troubleshooting issues.

Expand All @@ -21,7 +22,7 @@ IIS-level configuration (even in Web.config) can override the values set by Clie

## Default behavior

`Cache-control: public` is sent for all anonymous requests.
`Cache-control: private` is sent for all authenticated requests.
`Last-modified:` is sent based on the modified date of the source file.
`Expires` is sent only if 'minutes' is configured in web.config. For 24-hour expiration, use 1440 (suggested value).
* `Cache-control: public` is sent for all anonymous requests.
* `Cache-control: private` is sent for all authenticated requests.
* `Expires` is sent only if 'minutes' is configured in web.config. For 24-hour expiration, use 1440 (suggested value).
* If DiskCache is in use, then a `Last-modified:` date for the cached file is sent. Otherwise, no Last-modified date can be sent.
32 changes: 10 additions & 22 deletions content/docs/v4/plugins/cloudfront.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
:tags: plugin
:uservoice: true
:edition: performance
:tagline: Allows you to use Amazon CloudFront with the resizer. Highly recommended
- offers inexpensive worldwide edge caching and great scalability.
:tagline: Obsolete. Created before Amazon CloudFront natively supported query strings.
:aliases: "/plugins/cloudfront"
:edit_info: develop/plugins/cloudfront/readme.md
---

# CloudFront plugin

Makes the ImageResizer work nicely with CDNs that strip off query strings by default, such as Amazon CloudFront and Azure CDN. When you create a 'distribution' or 'endpoint', you often have the chance to enable querystring support. If you can do that, you don't need this plugin.
This plugin is **NOT** required to use Amazon CloudFront. It exists for historical reasons. At one time, Amazon CloudFront stripped off all querystrings.

Today, just enable querystring support/preservation when you create a 'distribution' or 'endpoint'. If you can do that, you don't need this plugin.

## Installation

Expand All @@ -22,7 +23,7 @@ Either run `Install-Package ImageResizer.Plugins.CloudFront` in the NuGet packag

## Details

Many CDNs strip off all querystring data before passing the request on to the origin server (the Image Resizer). To avoid this limitation, we've devised an alternate syntax using semicolons.
Some CDNs strip off all querystring data before passing the request on to the origin server running ImageResizer. To avoid this limitation, we devised an alternate syntax using semicolons.

image.jpg;width=100;height=100;crop=auto

Expand All @@ -48,36 +49,23 @@ By default, CloudFront caches all requests for a minimum of 24 hours (1440 minut

To set the caching time at the server instead of at CloudFront, set `<clientcache minutes="1441" />` in the `<resizer>` section of Web.config.

If you need to invalidate a cached file sooner than 24 hours, you must change the url (ex. by adding ";invalidate=1" to it), or by using [Amazon's invalidation request feature](http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?Invalidation.html).
If you need to invalidate a cached file sooner than 24 hours, you must change the URL (ex. by adding ";invalidate=1" to it), or by using [Amazon's invalidation request feature](http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?Invalidation.html).


## Automatic redirection of standard (`image.jpg?width=..`) URLs back to the CDN.

(In v3.1 and higher)
The CloudFront plugin can be configured to HTTP redirect image requests arriving in quersytring (`?key=value1` format) to use the CloudFront distribution instead of directly serving the request.

The CloudFront plugin can automatically redirect image requests to use the CloudFront distribution instead of directly serving the request.
We don't suggest this except to reduce server load in an emergency. Redirects make your site load more slowly in client browsers.

### Instructions


1. In the `<resizer>` section, just add `<cloudfront redirectThrough="http://d3urjqacv88oxz.cloudfront.net" redirectPermanent="false" />`.
2. Change d3urjqacv88oxz.cloudfront.net to match the distribution name you created in the AWS console.

The redirectThrough setting tells the CloudFront plugin to redirect any standard URLs back through the CloudFront distribution, automatically rewriting them to the semicolon syntax so everything will work properly. This feature, when configured, allows you to use normal `image.jpg?width=100&height=200` urls, without specifying either the distribution name, full path, or using the semicolon syntax in the anchor link.
The redirectThrough setting tells the CloudFront plugin to redirect any standard URLs back through the CloudFront distribution, automatically rewriting them to the semicolon syntax so everything will work properly. This feature, when configured, allows you to use normal `image.jpg?width=100&height=200` URLs, without specifying either the distribution name, full path, or using the semicolon syntax in the anchor link.

As automatic redirection requires the browser to make an additional HTTP request, latency may be increased, but overall request time may be slightly lower for large images, due to the faster connection available between the CloudFront server and the client. The primary advantages of automatic redirection are (a) increased scalability of the origin server, and (b) low developer cost - no extra work required.

If you have configured a CNAME mask for your CloudFront distribution, and would like to transfer the 'SEO weight' from the old URLs to the new CNAME-based urls, set redirectPermanent=true.

## Automatic image URL translation

To remove the requirement of an extra request, yet keep the developer/webmaster load to a minimum, it is necessary to process all outgoing HTML and translate those URLs to cloudfront URLs dynamically.

This kind of behavior could be useful outside the scope of the image resizer, as it could be used to edge-cache a variety of files (such as javascript, css, audio files, etc.) without having to manually modify the content. However, image URLs are the ones most easily changed without adverse affects.

Two possible options for modifying image URLs in HTML output are Control Adapters and Html filters.

If you're interested in testing this functionality, send me an e-mail, as I'd like to get several use cases ready before plunging into development.


Please send feedback! There's a little tab at the bottom that makes it easy. You can even suggest ideas and vote for them. Check it out!
If you have configured a CNAME mask for your CloudFront distribution, and would like to transfer the 'SEO weight' from the old URLs to the new CNAME-based URLs, set redirectPermanent=true.
9 changes: 5 additions & 4 deletions content/docs/v4/plugins/copymetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

# CopyMetadata plugin

**Warning. This plugin can only *copy* metadata, not read, or return it. It will be replaced in V4 with a more capable plugin.**
* **This plugin can only *copy* metadata, not read, or return it.**
* **Future ImageResizer and Imageflow releases may not support this command. Avoid using `&copymetadata=true` for maximum forwards-compatibility.**

Copies all metadata from the source image to the destination image.

Expand All @@ -24,10 +25,10 @@ Install `ImageResizer.Plugins.CopyMetadata`, *or*...

## Syntax

* `copymetadata=true`
* `&copymetadata=true`


### Resources

http://stackoverflow.com/a/25162782/166893
https://msdn.microsoft.com/en-us/library/system.drawing.imaging.propertyitem.id.aspx
* http://stackoverflow.com/a/25162782/166893
* https://msdn.microsoft.com/en-us/library/system.drawing.imaging.propertyitem.id.aspx
2 changes: 0 additions & 2 deletions content/docs/v4/plugins/customoverlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

# Custom Overlay plugin

New in V3.2

This is an example plugin. It is useful as a starting point, but is not subject to the same standards of maintenance and backwards-compatibility that normal plugins are. It does not have a NuGet package or precompiled binaries.

This plugin is for drawing image overlays using pre-determined x1,y1,x2,y2,x3,y3,x4,y4 coordinates that are relative to the base file's width and height. It supports any parallelogram, and can use any virtual path for loading the overlay image.
Expand Down
4 changes: 2 additions & 2 deletions content/docs/v4/plugins/defaultencoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:tags: plugin
:edition: free
:bundle: free
:tagline: "(default) Adjustable jpeg compression, 24-bit PNG with transparency support,
:tagline: "(default) Adjustable JPEG compression, 24-bit PNG with transparency support,
and standard (poor) .NET GIF encoding."
:aliases: "/plugins/defaultencoder"
:edit_info: develop/core/plugins/basic/defaultencoder_readme.md
Expand All @@ -13,7 +13,7 @@

Installed by default.

Provides adjustable jpeg encoding, 32-bit PNG encoding with transparency support, and standard .NET GIF encoding (which is quite lousy, and does not support transparency). Get the PrettyGifs plugin for high-quality GIF encoding.
Provides adjustable JPEG encoding, 32-bit PNG encoding with transparency support, and standard .NET GIF encoding (which is quite lousy, and does not support transparency). Get the PrettyGifs plugin for high-quality GIF encoding.

Jpeg quality defaults to 90, which is very good balance. You can override the setting by adding &quality=0-100

Expand Down
14 changes: 13 additions & 1 deletion content/docs/v4/plugins/diagnosticjson.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@

# DiagnosticJson plugin

DiagnosticJson allows you to access the estimated dimensions and information about the image as json instead of returning the image itself.
DiagnosticJson allows you to access the estimated dimensions and information about the image as json instead of returning the image itself.

## Activation commands

* `&diagnosticjson=layout` triggers the JSON response.
* `&j.indented=true` causes pretty-printing

## Installation

Either run `Install-Package ImageResizer.Plugins.DiagnosticJson` in the NuGet package manager, or:

1. Add a reference to ImageResizer.Plugins.DiagnosticJson.dll in your project.
2. Add `<add name="DiagnosticJsonPlugin" />` in the `<plugins>` section of Web.Config
Loading