Skip to content

Commit

Permalink
Fix for PDF urls.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawngee committed Sep 7, 2018
1 parent a07f283 commit 22e93a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions classes/Tools/Imgix/ImgixTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ private function buildImgixImage($id, $size, $params = null, $skipParams = false

$mimetype = get_post_mime_type($id);

if (!$this->renderPDF && ($mimetype == 'application/pdf')) {
return false;
}

$meta = wp_get_attachment_metadata($id);
if(!$meta || empty($meta)) {
if(($this->renderPDF && ($mimetype == 'application/pdf')) || ($this->enabledAlternativeFormats && ($mimetype == 'application/vnd.adobe.illustrator'))) {
Expand Down
2 changes: 1 addition & 1 deletion ilab-media-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://interfacelab.com/media-tools
Description: Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site performance and simplifies workflows.
Author: interfacelab
Version: 2.1.2
Version: 2.1.4
Author URI: http://interfacelab.io
*/

Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tested up to: 4.9.8
License: GPLv3 or later
Donate link: http://www2.jdrf.org/site/TR?fr_id=6912&pg=personal&px=11429802
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable tag: 2.1.2
Stable tag: 2.1.4
Requires PHP: 5.6

Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site performance and simplifies workflows.
Expand Down Expand Up @@ -97,8 +97,13 @@ No, I'm just one very enthusiastic customer.

== Changelog ==

= 2.1.4 =
* Fix URL for PDF uploads

= 2.1.2 =
* Updated PDF library
* Added better Google Cloud instructions (thanks @michaeljberry)
* Fix ILAB_AWS_S3_BUCKET_PREFIX environment variable (thanks @JulienMelissas)

= 2.1.1 =
* Added 'flip' imgix parameter to the image editor
Expand Down

0 comments on commit 22e93a0

Please sign in to comment.