title: Not being able to set the path for an image related to a model properly in Django
body: <p>I need to set a profile picture for a model in Django. I am using Pillow. My problem is that the path that I set on models.py (where the images go when I upload them using admin) is not the same as the one used by the template and so the images never show.</p>
  
  <p>My static folder is in the app's folder (this is a simple project with just one app) but admin uploads the images in some folder outside the app folder.</p>
  
  <p>This my code in models.py:</p>
  
  <pre><code>def get_image_path(instance, filename):
      return os.path.join('static/artists/images', str(instance.id), filename)
  
  class Artist(models.Model):
      name = models.CharField(max_length=255)
      soundcloud = models.URLField(max_length=255, blank=True, null=True)
      description = models.TextField()
      profile_picture = models.ImageField(upload_to=get_image_path, blank=True, null=True)
      current_roster = models.BooleanField(default=True)
  
      def __str__(self):
          return self.name.encode('utf8')
  </code></pre>
  
  <p>And this is the code in the template:</p>
  
  <pre><code>{% if artist.profile_picture %}
                  &lt;img src="{{ artist.profile_picture.url }}" alt="Artist pic" style="width: 200px;"&gt;
  {% endif %}
  </code></pre>
  
  <p>Can somebody help me please? Thanks in advance!</p>