Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I am facing an issue with the file getting displayed on the node add/edit page as preview when the file is added in custom file type.
Scenario:
I have created new file type as responsive image.
Then I created a field of type image in content type.
When I add image from my system it does not get displayed on node add/edit page as preview.
Comment | File | Size | Author |
---|---|---|---|
Drupal isssue.png | 44.15 KB | kaustubhb |
Comments
Comment #2
noopal CreditAttribution: noopal commentedHi, I have the same problem.
How can I display an image instead of a link?
Thanks
Comment #3
joseph.olstadinspect the image element, get the path to the image, does your web server have read/write/execute permissions on the sites/default/files/styles folder ?
the folder that stores this image in the styles folder, in there will be a thumbnail folder ,
also, check your image styles, if you're missing the thumbnail square image style, this could be what you need, create the exact same machine name image style as requested by the url when you inspect that image it's part of the path parameter, that image style must be present.
see this related issue if you still haven't figured this out.
#2486599: missing square_thumbnail causes Broken images in media browser and file/thumbnail
Comment #4
joseph.olstadComment #5
joseph.olstadComment #6
noopal CreditAttribution: noopal commentedHi Joseph.
Thank you for taking the time to reply.
No image is loaded. The html is as below.
image.jpg
Its a default icon for a file with the a link rather than rendered as an image. As far as I am aware I havent changed any settings.
However I am sure in previous installations the upload showed a preview of the image rather than a link to the image.
Maybe I have accidently changed something?