You can still use the media library and either reference the attachment’s ID or add a postmeta to the attachment containing your id.
You could even make this a bit easier by using a custom taxonomy instead of custom field. Add your numbers as terms to that taxonomy. Also register the taxonomy to apply to attachments. Then write a bit of code that whenever the post has (a) term(s) in that taxonomy finds the attachments that also have a the same term(s) in that taxonomy. This would even allow you to have both, multiple of your numbers for a post and multiple images per number, leading to all kinds of possible combinations.
Related Posts:
- Remove Dimension from wp_get_attachment_image
- Change wp_get_attachment_image attributes (src and srcset) on specific custom field
- How do I make a custom field choose an image?
- Extend WP Customizer to make multiple image selection possible
- Add multiple images to a page sidebar
- Display thumbnail from custom field
- Add custom field to image editor
- Display info from custom fields in all images’ HTML
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- copy attachments to another post type and change attachment url
- limit amount of photos uploaded per cpt post
- Metabox with multiple fields added by user and upload box
- Add WYSIWYG to Image Description field
- Get Meta from Custom Field of Image URL
- Add url from Custom Field as ‘Featured Image’. Code not working
- How to display multiple images in custom field
- How to add image attachment to post from a single meta key (Woocommerce)
- Exclude images uploaded via meta boxes from WordPress gallery
- How to add the image URL from an external RSS feed and insert into a custom field?
- Add new image block, set default class name and update it using Javascript
- Better way to save image in custom field
- How do I add an image upload, custom field to a WooCommerce product?
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- Select multiple images from custom field
- Displaying page image in the footer automatically
- Get image url using image id
- Show image if author meta (profile fields) exists outside loop
- Convert attachment ID into url?
- Custom field as featured image caption
- Display a different image for each page with editor
- Image upload and path to custom field
- How to get custom image field of specific post id
- Selectively hiding or allowing thumbnails of featured images on front page
- wp_get_attachment_image_src() with advanced custom fields returning empty
- Unable to select image with custom field
- Adding Facebook’s image and meta description retrieval capabilities to a WordPress post
- Show image depending on the number in the custom fields
- How to delete attachments associated with custom field type when post property changes? [closed]
- Use a different catalog image than the featured image
- How to add custom fields to images for image source text and URL
- Get first URL from custom field, download and set as featured image on post publish
- Change path to child of page when uploading image via custom field
- Analyze uploaded images to get colour values
- Adding thumbnails for non-image attachments
- Upload image to wordpress
- Undefined Variable (Displaying image via custom field)
- Multiple image uploader under editor?
- Get single image from custom fields made with WCK custom fields creator
- Add image custom attribute [closed]
- How to mark a image attachment as background image?
- Crop custom image size vs actual size
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- Advanced Custom Fields – Get custom fields from parent page
- Tabindex on text input immediately after WordPress title input
- Allow user to create instances of custom field
- get_pages sort alphabetically by meta value
- Add custom field (value) to search result (without plugin)
- 2 orderby in wp_query with 2 custom fields
- Compare meta_query decimals not working right
- Query on custom field count?
- Stopping WordPress from Auto Generating Image Files for Sizes
- Unable to show ACF’s Image Custom Field properly in Genesis Framework [closed]
- Custom field value based on other custom field values
- Woocommerce Storefront WordPress Ignore Media Gallery Images and use External 3rd Party Host
- Sorting posts by custom fields in meta_query
- Delete all custom fields at once?
- get_post_meta just returns Array
- Odd PHP Code To Display HTML Of Meta Box [closed]
- strtotime and custom field value
- Unique Post Meta Values
- Merge Multiple Custom Fields into one New Custom Field for Searching
- Is there a better way to list all database terms alphabetically?
- Custom Field 101
- Changed PHP handler to DSO – weird custom fields problem [closed]
- Is there a way to set default custom fields when creating a new post?
- Add custom column for custom field
- How to sort by custom field value?
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- Custom field bug in WordPress 3.2
- Custom field on Quick Edit using select/dropdown – almost working right but not showing currently selected value
- Type character in name and make it invisble
- How to set up page fields with gutenberg instead of ACF
- Move the post title to another field
- ACF multi taxonomy on filterable gallery
- Custom user registration fields in user_register hook
- Unable to change checkout placeholder text
- author.php not showing content if Author has no Posts
- Custom Fields Not Working In Footer
- Add custom field to post with some part of url as value
- CSS conditional on custom field value
- WP Post Meta Box Field Not Showing Updated Field
- WP_Query based on multiple metadata comparisons
- same custom field for single posts
- Alter SQL query to return posts with unique custom field value, no duplicate values
- custom field output after the_content
- Post count by meta_key meta_value [closed]
- Change post status by custom fields
- Is there a way to read JSON data inside Custom Fields without editing PHP? [closed]
- Modal pop-up HTML code works on other sites or HTML viewers but not in the custom HTML block within a wordpress page?
- Automatically changing a posts status to draft based on magic fields [closed]