Questions tagged [imagefield]

A place to store or display a graphic image.

"Image field" is a generic term that typically would belong in a or setting such as:

It appears to be a synonym for .

342 questions
2
votes
1 answer

Is it possible to remove 'Currently' label when using django-stdimage?

I am using django-stdimage in my Django app and it works great, the only problem is that I want to remove the 'Currently' string, the clear checkbox and the rest of the decoration from the HTML template. I can't figure out how to achieve this. Here…
juankysmith
  • 11,839
  • 5
  • 37
  • 62
2
votes
1 answer

How to get the size of the image field in sitecore 8?

I tried to get the size of my image field in sitecore, but am not able to achieve. I can take the height and width of the image by using below code. @{ Sitecore.Data.Items.Item curItem = Sitecore.Context.Item; Sitecore.Data.Fields.ImageField…
Ramesh
  • 1,073
  • 6
  • 24
  • 53
2
votes
1 answer

Preserve url in django ImageField when copying to a new model instance

I am performing a data migration, moving images from inside one model out to their own model. class OldCrappyModel(models.Model): ... original_image = models.ImageField(upload_to=upload_original_image, null=True, blank=True) …
raphael
  • 447
  • 4
  • 17
2
votes
1 answer

Django weird behavior with model containing ImageField

I am facing a really strange behavior with my Photo model, containing a ImageField. When I execute the following piece of code: photos = Photo.objects.all() for p in photos: print p.id I get this error after Django displayed about 36680 ids…
user650108
  • 1,009
  • 1
  • 9
  • 18
2
votes
1 answer

Save file from Database image field

I have uploaded a text file to my database into a Image field. The problem is when I try to retrieve the file (make the user able to download it on a click on a link). When I try to download it, it is simply filled with the content of the webpage…
Dofs
  • 17,737
  • 28
  • 75
  • 123
2
votes
1 answer

Re-use of image FIELDS to insert images in text areas in D7?

I am trying to build a site with two main types of content: Image Galleries (based on nodes and image FIELDS and Views) Some text-based content type like Blog The workflow will be: Upload and arrange some images in my galleries. Create a blog…
2
votes
3 answers

Accessing ImageFields associated with Haystack SearchQuerySet

I have a model with an ImageField that I'm indexing for search using Django Haystack, and I'd like to use the images in my search results. Correct me if I'm wrong, but you can not have an ImageField in a Django Haystack SearchQuerySet. So what is…
HighLife
  • 4,218
  • 7
  • 40
  • 56
2
votes
1 answer

Django ImageField not working in template

I can upload images in Django admin and they appear in the correct directory, but when I have these issues when I try to view them in my templates: {% if city.main_image %} returns false in my template {{ city.main_image.url }} returns nothing {{…
HighLife
  • 4,218
  • 7
  • 40
  • 56
1
vote
1 answer

ImageField resizing on save also updating width_field and height_field

I have a model containing ImageField which should be resized after uploading. class SomeModel(models.Model): banner = ImageField(upload_to='uploaded_images', width_field='banner_width', …
Dzejkob
  • 2,302
  • 2
  • 15
  • 20
1
vote
1 answer

django imagefield model

how can I define it in the model if I want the image to save in the path 'img/'currentdateMonthYear_ + category_+ the given name. The category depend on what I choose? currently I describe my model as such: class Image(models.Model): title …
Lewis
  • 147
  • 1
  • 3
  • 10
1
vote
2 answers

How to let Drupal editors choose an imagecache preset when uploading to imagefield?

Is somebody aware of a module that allows content editors to select an imagecache preset for each node individually? I'd like my editors to be able to choose between 3 different presets each time they upload an image to an imagefield. Things I…
klickreflex
  • 181
  • 2
  • 9
1
vote
1 answer

Generating PDFs from Image field on new server

So, I'm trying to a server and I'm moving a website from an older server to a new one. It's changing from 32-bit to 64-bit. The developer (who is no longer here) coded the webstie to upload PDF documents and save them in an Image field. Works…
1
vote
1 answer

Django. How to create a new instance of a model from views.py with an image field in the model

I am trying to create a new instance of a model that has an image field in it. I take a PDF from a form and convert it to a png file format and am now trying to save the png image to a model data base but get the error 'PngImageFile' object has no…
Bleached
  • 35
  • 4
1
vote
1 answer

django set image delete old reference and prevent delete default

despite of many mordern website employ an OSS for serving image, I still want to build a backend to manage small thumbnails locally. however, django image field is a bit tricky. there are three views I may change image…
Weilory
  • 2,621
  • 19
  • 35
1
vote
1 answer

Can't Upload Image to ImageField through csv file

My Django application: In my model, I use ImageField to allow the upload of images. In my csv file I have an image path for an image like this: C:/Users/blah/DjangoProject/abc/abc/csvs/photos/product_1/product-1_1.jpg In my csv's view I…