Images doesn't display correctly

Images doesn't display correctly

Issues2018Issues2018 Posts: 5Questions: 2Answers: 0

I have a table with a column in which I show images loaded by Django.

Each time I reload the page, the images change, although the reference to them in the HTML is correct.

That is, if I look at the URL of the image, it is correct, but the image that is displayed does not correspond to the url.

This happend with every browser.

Thanks so much

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    Hi @Issues2018 ,

    We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • Issues2018Issues2018 Posts: 5Questions: 2Answers: 0
    edited June 2018

    Hello,

    I tryed to reproduce my case but I load my data from Djago as follow:

    and I can not reproduce it as an example, but I tried to reproduce it as best as possible.

    http://live.datatables.net/sojazure/5/edit

    If I click to the image, It download the correct picture, so HTML looks fine.

    I think that It could be a caché problem but If I delete my caché, it doesn't fix it.

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    I'm not sure what to say really, especially without seeing the table. DataTables doesn't cache table contents (if stateSave is present, it'll cache ordering/filtering/etc. but not the content), could it be something in Django or some proxy that's holding the images?

    C

  • Issues2018Issues2018 Posts: 5Questions: 2Answers: 0
    edited June 2018

    It doesn't be caused by Django because Django write the HTML and If i watch the source code of my web, I can see that HTML is right and I have not any proxy.

    The problem is that every time I reload the web page, the images in the table change, but the html is the same, so the image that is showing in the table is not the one that the HTML says that it has to be. You know what I mean?

  • colincolin Posts: 15,146Questions: 1Answers: 2,586

    I know what you mean, but as I said, DataTables doesn't cache the table contents - so something else must be - either the browser, a proxy, etc., but definitely not DataTables.

  • colincolin Posts: 15,146Questions: 1Answers: 2,586
    Answer ✓

    One thing to consider, is where does the image come from? DataTables wouldn't get a thumbnail (unless you told it to), so something must be giving the table the image. That would be a good place to start.

  • Issues2018Issues2018 Posts: 5Questions: 2Answers: 0

    The image come from my image server, I'm going to investigate it.

    Thanks Colin.

This discussion has been closed.