Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Images are broken #266

Open
dimitarkolev opened this Issue · 14 comments

8 participants

@dimitarkolev

All image files under /src/files/images i used to have are broken after generation. They appear in the out folder but for some reason they are all broken. Each and every image in the out folder is exactly 15bytes long :)

@balupton
Owner

Fixed in v6.3.3

@balupton balupton closed this
@evanblack

I'm having this problem after after updating from v6.5.x to v6.6.4

@balupton
Owner

Hrmmm, v6.6.4 changes the binary detection in order to fix #288 so it'll be a regression here.

The issue is that we scan a chunk of the file to determine if it is a binary or utf8 file, if that chunk however is utf8 and the rest is binary, we'll get the wrong result.

Unfortunately, this is going to be a bit of a hit and miss at times as we can't scan the entire file as that would be too slow. So I'll to come up with some intelligent way of scanning with higher confidence. Perhaps that'll also mean extension preferences too.

Can you email the source image files that are not being outputted correctly to support@docpad.org (or upload them to some cloud service if you prefer and email the link)

@balupton balupton reopened this
@evanblack

A little different from the original issue, I'm only having problems with certain images without any noticeable pattern. As a workaround, I ran all the images through ImageOptim, and that seemed to clear things up. Email with the problematic images headed your way.

@santip

Same issue over here for many small png files, reverting to 6.5.7 seems to solve the issue. Let me know if you need me to send the files over.

@CycoPH

Got this issue with every image that I had modified from Adobe Photoshop CS5 (only JPGs so far).

@santip
@balupton balupton referenced this issue from a commit
@balupton balupton v6.6.5. Bugfix.
- v6.6.5 September 18, 2012
	- Further improved file encoding detection
		- Closes [#266: Images are
broken](#266)
de59b71
@balupton
Owner

Should be fixed in v6.6.5. Let me know.

@balupton balupton closed this
@balupton
Owner

Btw, if someone can provide me with open-source licensed images that I can include in the test suite, that will be awesome. Email support@docpad.org with the images if you have them with their copyright notice. As otherwise I can't include such files in any automated test suite :(

@evanblack

Confirmed fixed in v6.6.5 for me.

@pdelanauze

Just spotted this in v6.8.3, some files don't get copied over properly. Comes out as 0 bytes after running a docpad generate
Tried going back to v6.6.5 and same issue .. :(

@pdelanauze

ah, just noticed the initial bug report refers to /src/files/ , in my case, the images are embedded inside the documents/pages/.. along with the markdown documents. They are copied over but are 0 bytes...

@balupton
Owner

The documents directory does not support binary files, only files does. What DocPad should probably do is check for this and provide a warning :)

However, you should be able to move them to files/pages/... and get the result you're after.

@balupton balupton referenced this issue from a commit
@balupton balupton v6.6.5. Bugfix.
- v6.6.5 September 18, 2012
	- Further improved file encoding detection
		- Closes [#266: Images are
broken](#266)
229db95
@chrisdavies

I got this to duplicate by downloading this image into my /src/files/images folder:

http://sass-lang.com/assets/img/logos/logo-235e394c.png

@balupton balupton reopened this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.