Skip to content
This repository

Images are broken #266

Closed
dimitarkolev opened this Issue · 13 comments

6 participants

Dimitar Kolev-Dick Benjamin Arthur Lupton Evan Black Santiago Perez Peter Patrick de Lanauze
Dimitar Kolev-Dick

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 :)

Benjamin Arthur Lupton
Owner

Fixed in v6.3.3

Benjamin Arthur Lupton balupton closed this
Evan Black

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

Benjamin Arthur Lupton
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)

Benjamin Arthur Lupton balupton reopened this
Evan Black

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.

Santiago Perez

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.

Peter

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

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

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

Benjamin Arthur Lupton balupton closed this
Benjamin Arthur Lupton
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 :(

Evan Black

Confirmed fixed in v6.6.5 for me.

Patrick de Lanauze

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 .. :(

Patrick de Lanauze

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...

Benjamin Arthur Lupton
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.

Benjamin Arthur Lupton balupton referenced this issue from a commit
Benjamin Arthur Lupton v6.6.5. Bugfix.
- v6.6.5 September 18, 2012
	- Further improved file encoding detection
		- Closes [#266: Images are
broken](#266)
229db95
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.