Domanda

I'm working on a project that involves .png images. My workflow consists of...

  1. Pushing the images to a Github repository
  2. SSH-ing into a remote staging server
  3. Doing a git pull to add the images to the staging server.

When I inspect the images in Github, they appear fine. However, after I pull them onto the staging server, the bottom of the image appears truncated. The browser fills the bottom of the image with an ugly black placeholder.

Here's how one of the images looks on Github: enter image description here

Here's how the same image looks on my staging server: enter image description here

Is there a known issue that could cause .png files to become truncated or corrupted after a Git pull?

È stato utile?

Soluzione 2

The problem had to do with web hosting. I was using Bluehost's shared SSL environment, which has a data transfer limit of roughly 110kb. Files larger than that size were being truncated.

Altri suggerimenti

Make sure you don't have, on your staging server, a setting like core.autocrlf=true.
That would try and convert all file EOL (end of line) to LF or CRLF depending on the staging server OS, which won't play so well with binary files like a picture.

See:

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top