hugo/resource
Rob Jackson b718d743b7 Fix file paths for uncached transformed images
This commit also fixes an existing test to work according to the correct logic. The test was written based on erroneous behavior. We resize the image to 300x200px, and are now trying to fit it within a 50px square. The longest edge is 300 pixels, so we need to divide it by 6 (300 / 50 == 6). And then scale the shortest edge with the same proportion (200 / 6 == 33.33).

The original test was transforming the original source image, hence the previous values:

900 x 562
900 / 50 == 18
562 / 18 == 31.22

Fixes #5012
2018-07-31 13:31:35 +02:00
..
bundler resource/bundler: Improve error message 2018-07-16 10:42:07 +02:00
create resource: Clean up the in-memory Resource reader usage 2018-07-12 21:32:52 +02:00
integrity resource/integrity: Remove unused code 2018-07-14 11:17:48 +02:00
minifiers media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
postcss resource/postcss: Try node_modules/postcss-cli/bin/postcss first 2018-07-18 10:00:50 +02:00
templates Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00
testdata
tocss/scss tocss/scss: Improve SCSS project vs themes import resolution 2018-07-31 10:54:10 +02:00
image.go Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00
image_cache.go Fix file paths for uncached transformed images 2018-07-31 13:31:35 +02:00
image_test.go Fix file paths for uncached transformed images 2018-07-31 13:31:35 +02:00
readers.go resource: Clean up the in-memory Resource reader usage 2018-07-12 21:32:52 +02:00
resource.go resource: Clean up the in-memory Resource reader usage 2018-07-12 21:32:52 +02:00
resource_cache.go Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00
resource_metadata.go Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00
resource_metadata_test.go Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00
resource_test.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
smartcrop.go
testhelpers_test.go Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00
transform.go resource: Clean up the in-memory Resource reader usage 2018-07-12 21:32:52 +02:00
transform_test.go Add Hugo Piper with SCSS support and much more 2018-07-06 11:46:12 +02:00