{"record":{"id":"ef3d562ec2bfa0f8","repo":"HandyOrg/HandyControl","slug":"image-src-can-not-be-empty","errorCode":null,"errorMessage":"Image src can NOT be empty","messagePattern":"Image src can NOT be empty","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"doc/themes/next/scripts/tags/full-image.js","lineNumber":19,"sourceCode":"/**\n * full-image.js | https://theme-next.org/docs/tag-plugins/full-image\n */\n\n/* global hexo */\n\n'use strict';\n\nfunction fullImage(args) {\n  args = args.join(' ').split(',');\n  var mixed = args[0].split('@');\n  var img   = mixed[0];\n  var src   = mixed[1] === 'lazy' ? '/images/loading.gif\" data-original=\"' + img : img;\n  var alt   = args[1] || '';\n  var title = args[2] || '';\n  var width = args[3] || '';\n\n  if (!img) {\n    hexo.log.warn('Image src can NOT be empty');\n  }\n\n  var image = [`<span itemprop=\"image\" itemscope itemtype=\"http://schema.org/ImageObject\"><img itemprop=\"url image\" src=\"${src}\" class=\"full-image\"`];\n  alt.length > 0 && image.push(`alt=\"${alt.trim()}\"`);\n  title.length > 0 && image.push(`title=\"${title.trim()}\"`);\n  width.length > 0 && image.push(`style=\"max-width: none; width:${width};\"`);\n  image.push('/><meta itemprop=\"width\" content=\"auto\"/><meta itemprop=\"height\" content=\"auto\"/></span>');\n\n  return image.join(' ');\n}\n\nhexo.extend.tag.register('fullimage', fullImage, {ends: false});\nhexo.extend.tag.register('fi', fullImage, {ends: false});\n","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/HandyOrg/HandyControl/blob/2c0875ebd67326e0c67282967e3e809c69282fee/doc/themes/next/scripts/tags/full-image.js#L1-L33","documentation":"The NexT theme's full-image Hexo tag logs a warning via hexo.log.warn when the image source argument is empty. Even with an empty src, the tag still emits an <img> whose src becomes the loading.gif placeholder or an empty string, producing a broken or placeholder image in the rendered post. It is a non-fatal authoring mistake, not an exception.","triggerScenarios":"Using {% fullimage %} (or its alias) in a post with no image path argument, e.g. {% fullimage /images/pic.jpg %} typo'd to {% fullimage %} or an unquoted argument containing '@' splits leaving img falsy.","commonSituations":"Markdown authors pasting the tag syntax incorrectly, forgetting the image URL after the tag name, or a Liquid/Jinja-style template variable that rendered to an empty string inside the tag arguments.","solutions":["Add the image path as the first argument of the {% fullimage %} tag in the post source.","If the path comes from a variable or front-matter field, verify it is non-empty before rendering.","Check argument quoting: paths with spaces must be quoted so they are not split into separate args."],"exampleFix":"// before\n{% fullimage 'lazy' %}\n// after\n{% fullimage /images/photo.jpg 'lazy' 'Alt text' %}","handlingStrategy":"validation","validationCode":"function checkFullimageArgs(args) {\n  const img = args && args[0];\n  if (!img || !String(img).trim()) {\n    console.warn('{% fullimage %} requires a non-empty image src as the first argument');\n    return false;\n  }\n  return true;\n}","typeGuard":"function hasImageSrc(args) {\n  return Array.isArray(args) && typeof args[0] === 'string' && args[0].trim().length > 0;\n}","tryCatchPattern":null,"preventionTips":["Always pass the image path as the first argument of {% fullimage %}.","Quote paths containing spaces so they are not split into multiple args.","Lint post sources for tag calls with empty argument lists before hexo generate."],"tags":["hexo","theme","empty-argument","markdown"],"backgroundTag":"empty-required-field","analyzedSha":"2c0875ebd67326e0c67282967e3e809c69282fee","analyzedAt":"2026-09-14T14:45:29.754Z","contentChangedAt":"2026-09-14T14:45:29.754Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}