{"id":42116403,"url":"https://github.com/susom/redcap-em-image-viewer","last_synced_at":"2026-01-26T14:09:32.676Z","repository":{"id":27318268,"uuid":"113293089","full_name":"susom/redcap-em-image-viewer","owner":"susom","description":"Display images from uploaded files in your survey or webpage","archived":false,"fork":false,"pushed_at":"2024-07-26T21:08:36.000Z","size":1116,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-07-26T22:39:41.861Z","etag":null,"topics":["redcap","redcap-external-module","redcap-repo"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/susom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-06T09:01:52.000Z","updated_at":"2024-07-26T21:08:38.000Z","dependencies_parsed_at":"2024-07-26T22:32:26.912Z","dependency_job_id":null,"html_url":"https://github.com/susom/redcap-em-image-viewer","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/susom/redcap-em-image-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fredcap-em-image-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fredcap-em-image-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fredcap-em-image-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fredcap-em-image-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/susom","download_url":"https://codeload.github.com/susom/redcap-em-image-viewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susom%2Fredcap-em-image-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28780258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redcap","redcap-external-module","redcap-repo"],"created_at":"2026-01-26T14:09:32.619Z","updated_at":"2026-01-26T14:09:32.667Z","avatar_url":"https://github.com/susom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Viewer\n\nA REDCap External Modules that provides a preview of images and PDFs in file upload fields and allows piping of such previews into labels of other fields.\n\n## Supported file types\n\n- JPEG (.jpeg, .jpg, .jpe)\n- GIF (.gif)\n- PNG (.png)\n- TIFF (.tif)\n- BMP (.bmp)\n- PDF (.pdf)\n- DICOM (.dcm)\n\n## Directions\n\n- Enable the module on your server. If you wish to enable some logging, there is a server-setting to specify a log path.\n- Enable the module on the projects where you wish to use the features of this module.\n- Use the module configuration tool to select the preview fields.\n- Alternately, you can use the @IMAGEVIEW action tag to specify fields to be previewed by editing the data dictinoary directly.\n- Each field can be supplied with CSS paramaters to control formatting. For example, on a PDF upload field you might add a parameter of `{ \"height\": \"400px\" }`.\n- If you are supplying custom formatting using the action tag, the format is: `@IMAGEVIEW={\"height\":\"500px\"}`\n  - The format of the parameter string must be valid JSON (see https://jsonlint.com/)\n  - In some cases, you might not be able to override the formatting if the parent table is constraining you.\n  - If custom formatting is supplied both in an action tag and as part of the EM config page, the EM config page will take precedence.\n  - The default size is to expand to the maximum width of the current table cell.\n  - For right-vertical (Default) this means upto 50% but less if the image is smaller.\n  - For left-vertical alignment this means the full width of the cell.\n- To pipe an uploaded image or PDF into another field's label, use the `@IMAGEPIPE` action tag.\n  - The parameter for this action-tag must be valid JSON, specifying the name of the source file upload or descriptive field alone, or together with event and/or instance:\n  `@IMAGEPIPE=\"file_upload_field\"`\n  `@IMAGEPIPE={\"field\":\"file_upload_field\",\"event\":123,\"instance\":1}`\n  - Events can be specified by name or number.\n  - Instances must be specified by number.\n  - Smart Variables can be used for event and instance - specify as e.g. `{..., \"instance\":\"[first-instance]\"}`.\n\n## Piping and Security\n\n- Piped images or PDFs from forms the user (or survey participant) has no access to **will** be displayed.\n- Security measures are in place that prevent unauthorized downloads.\n\n## Examples\n\n### Upload preview\n\n![Example Survey](docs/preview.png)\n\n### Piping\n\nConsider the record structure in this example: Images are uploaded in both events. In the second event, the upload field is on a repeating form.\n`View` is set up to show the file from the first event (`upload`) and the _last instance_ of the file from the second event (`upload2`).\n\n![Piping Example](docs/piping.png)\n\n## Changelog\n\nVersion | Description\n------- | -------------------\n1.4.8   | PHP8-related bugfixes.\n1.4.7   | Internal updates.\n1.4.6   | Add support for multiple data tables.\n1.4.5   | Updated framework to version 8 and updated library for pdfobject\n1.4.4   | Minor bug fix on util logging class\n1.4.3   | Added support for lowercase and fixed piping bugs (PR#6)\n1.4.2   | Added REDCap minimal version requirement (9.7.8)\n1.4.1   | Bug fixes (repeating events)\n1.4.0   | Added support for image/PDF piping with the @IMAGEPIPE action-tag. Images are not part of the hyperlink any more.\n1.3.2   | Supports embedding PDFs from descriptive fields as well.\n1.3.1   | Made a minor fix in the ActionTag class that was calling an external class not included in the module.\n1.3     | Added support for PDF files as well in addition to improving the preview of newly uploaded files.\n1.2     | Bug fix in field specifications.\n1.1     | Added support for custom action-tag @IMAGEVIEW.\n1.0     | Initial release.\n0.2     | Working and simplified version that is almost exclusively JavaScript.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusom%2Fredcap-em-image-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsusom%2Fredcap-em-image-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusom%2Fredcap-em-image-viewer/lists"}