{"action":"created","issue":{"url":"https://api.github.com/repos/WGBH/django-versatileimagefield/issues/13","labels_url":"https://api.github.com/repos/WGBH/django-versatileimagefield/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/WGBH/django-versatileimagefield/issues/13/comments","events_url":"https://api.github.com/repos/WGBH/django-versatileimagefield/issues/13/events","html_url":"https://github.com/WGBH/django-versatileimagefield/issues/13","id":76321378,"number":13,"title":"PlaceHolderImage Image size 0","user":{"login":"jonashagstedt","id":603835,"avatar_url":"https://avatars.githubusercontent.com/u/603835?v=3","gravatar_id":"","url":"https://api.github.com/users/jonashagstedt","html_url":"https://github.com/jonashagstedt","followers_url":"https://api.github.com/users/jonashagstedt/followers","following_url":"https://api.github.com/users/jonashagstedt/following{/other_user}","gists_url":"https://api.github.com/users/jonashagstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/jonashagstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonashagstedt/subscriptions","organizations_url":"https://api.github.com/users/jonashagstedt/orgs","repos_url":"https://api.github.com/users/jonashagstedt/repos","events_url":"https://api.github.com/users/jonashagstedt/events{/privacy}","received_events_url":"https://api.github.com/users/jonashagstedt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T11:01:41Z","updated_at":"2015-05-15T15:06:39Z","closed_at":"2015-05-15T15:05:09Z","body":"`OnDiscPlaceholderImage` seem to have a bug in it:\r\n\r\nThis line: `self.image_data = ContentFile(file.read(), name=name)` causes the file to be read.\r\nThe next line `super(OnDiscPlaceholderImage, self).__init__(file, name)` is setting `self.image_data` again using `file.read()`, however file.read() will now return `''` thus `self.image_data` is always `''`\r\n\r\nI found this when I was writing a custom placeholder image class that reads from `STATIC` rather than `MEDIA`"},"comment":{"url":"https://api.github.com/repos/WGBH/django-versatileimagefield/issues/comments/102424799","html_url":"https://github.com/WGBH/django-versatileimagefield/issues/13#issuecomment-102424799","issue_url":"https://api.github.com/repos/WGBH/django-versatileimagefield/issues/13","id":102424799,"user":{"login":"respondcreate","id":843929,"avatar_url":"https://avatars.githubusercontent.com/u/843929?v=3","gravatar_id":"","url":"https://api.github.com/users/respondcreate","html_url":"https://github.com/respondcreate","followers_url":"https://api.github.com/users/respondcreate/followers","following_url":"https://api.github.com/users/respondcreate/following{/other_user}","gists_url":"https://api.github.com/users/respondcreate/gists{/gist_id}","starred_url":"https://api.github.com/users/respondcreate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/respondcreate/subscriptions","organizations_url":"https://api.github.com/users/respondcreate/orgs","repos_url":"https://api.github.com/users/respondcreate/repos","events_url":"https://api.github.com/users/respondcreate/events{/privacy}","received_events_url":"https://api.github.com/users/respondcreate/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T15:06:39Z","updated_at":"2015-05-15T15:06:39Z","body":"Hey @jonashagstedt !\r\n\r\nThis issue has been patched and the fix is available in the 1.0.1 release. Upgrade via pip and you should be good to go:\r\n\r\n    $ pip install django-versatileimagefield==1.0.1\r\n\r\nThanks again for filing this ticket!"}}